[unixODBC-dev] Issue with ODBC on 64 bit machine while using SQLUINTEGER and SQLINTEGER

Kent Boortz kent at mysql.com
Sat Apr 19 22:45:27 BST 2008

Martin Evans <martin.evans at easysoft.com> writes:
> How are you compiling your code? Perhaps your MySQL driver was compiled 
> with SIZEOF_LONG = 8 and your code is compiled with SIZEOF_LONG=4 ! Only 
> guessing as the unixODBC sql* header files test SIZEOF_LONG but nothing 
> is recorded in unixODBC itself to say how it was compiled. That means 
> you can compile unixODBC with SIZEOF_LONG = 8, your driver with 
> SIZEOF_LONG=4 and your app with SIZEOF_LONG=xx and they won't work together.

JFYI, the MySQL drivers are right now compiled against unixODBC-2.2.12
(with a few patches applied to correct unixODBC "descriptor bugs").

For 64-bit builds we currently don't set BUILD_REAL_64_BIT_MODE but we
do set SIZEOF_LONG to 8 for all 64 bit platforms.

This means that the driver is not compatible with precompiled unixODBC
part of Linux distributions that has patched the source to set


More information about the unixODBC-dev mailing list