Selecting a field with a BIGINT data type in MS Access #1307
-
I have created a MS ACCESS table through python using the pyodbc module, like so: Note that the BIGINT data type was used for the denary column (the usual INTEGER datatype is just too small for my conversions), however when I try to query this table, I end up getting a strange format back (despite me checking that everything is saved correctly in the MS Access file as can be seen in image). Shot of the MS ACCESS database, which has the correct format for the denary field: The resultant value for the denary column when I use cursor.fetchall() is in a strange format, for instance: what would usually be "747" becomes "˫\x00\x00\x00", what would usually be "700707" becomes "넣\n\x00\x00". Using the INT datatype instead of the BIGINT fixes it. This is the kind of simple query that I am running: Including this conversion code didn't change anything: The ODBC trace: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Try using |
Beta Was this translation helpful? Give feedback.
-
Driver bug.
pyODBC is requesting the data as a wide string but it appears the driver returns raw 8-byte integer. Of course, even the SQLDescribeCol is wrong as it claims this is an nchar(8) column. |
Beta Was this translation helpful? Give feedback.
Aha. Try