Re: Find the Largest Integer in Column
- From: "Patrice" <http://www.chez.com/scribe/>
- Date: Wed, 24 Oct 2007 10:59:33 +0200
The first step would be to check the client side type of this column.Are you
sure you don't convert this to a string when extracting the data from the db
? What Göran wanted to say is that the data type of the column is taken
into account for the calculation i.e. for now it is likely that this
smallint value is stored as a string client side and it would work if it was
really stored as a numeric value...
--
Patrice
"Randy" <spam.eastland@xxxxxxxxx> a écrit dans le message de news:
1193167361.793468.65650@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I have a table which contains a unique value in a column called "Idx",
which is a smallint data type. I need to find the maximum value in
this column, which I have been attempting to do with this command:
Dim intMaxIdx As Integer = CInt(Me.ds.myTable.Compute("MAX(Idx)",
Nothing))
I noticed that this command treats the values like strings rather than
integers. For example, if I have a value of 2 and a value of 11, the
value 2 is returned as the maximum value. I can't figure out how to
execute this so that it handles them like numbers, not strings.
Can anybody suggest anything?
Thanks,
Randy
.
- References:
- Find the Largest Integer in Column
- From: Randy
- Find the Largest Integer in Column
- Prev by Date: RE: Form Sizing
- Next by Date: Re: Select Case
- Previous by thread: Re: Find the Largest Integer in Column
- Next by thread: Rows in Datagrid
- Index(es):
Relevant Pages
|