G'day,

I've got a problem with the ODBC driver for MySQL, in that when I use an
SQL select statement on a field of type UNSIGNED INTEGER, the resulting
recordset in asp uses SIGNED INTEGER data types, so any data > 2^31 is
dropped by asp.

The offending code is as follows:


        Set sqlCommand = Server.CreateObject("ADODB.Command")
        sqlCommand.ActiveConnection = "MyDatabase"
        sqlCommand.CommandText = "SELECT * FROM " & SQLTable & " Where
DataDate >= " & StartDate & " and DataDate <= " & EndDate & " ORDER BY
DataDate"
        Set rs = sqlCommand.Execute

The database design:

mysql> describe SQLTable;
+----------+------------------+------+-----+---------+-------+
| Field    | Type             | Null | Key | Default | Extra |
+----------+------------------+------+-----+---------+-------+
| DataDate | int(10) unsigned | YES  |     | NULL    |       |
| DataIn   | int(10) unsigned | YES  |     | NULL    |       |
| DataOut  | int(10) unsigned | YES  |     | NULL    |       |
| Elapsed  | int(10) unsigned | YES  |     | NULL    |       |
+----------+------------------+------+-----+---------+-------+
4 rows in set (0.00 sec)


Unfortunatly, whenever the data in any of the fields exceeds
2,147,483,648 it is dropped from the resulting recordset.
... And just to throw a spanner in the works, that code works perfactly
on our development PC, but not on the production server.

Does anyone have any idea why this would be failing, or know a better
way to select the code and drop it into a recordset (or array) in asp?

Thanks for any help.

Will Lotto
Systems Administrator


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to