Re: Issue with ODBC on 64 bit machine while using SQLUINTEGER and SQLINTEGER

Nick Gorham <[email protected]>
Newsgroups gmane.comp.db.unixodbc.devel
Message-ID <[email protected]>
Martin Evans wrote:

> qureshifaizan faiz wrote:
>
>> Hi nick,
>> Thanks for the reply.please find the attached sample code
>> along with the sample table description to give you a bit
>> of more sight.I am very grateful  for your interest in this
>> issue. Waiting for your reply,guys because this code
>> works in 32 bit machine iam not able to find the problem.
>> why it is not working on  a 64 bit machine.
>>
>> Regards,
>> Faizan
>
>
> 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.
>
> Martin

Yes, what Martin says is correct, but it should not be the problem here, 
as SQLINTEGER is always 4 bytes.

However, if the app, DM and driver are built in different ways then it 
will cause problems.

The newer releases of unixODBC allow the compile settings to be found by 
configure scripts using

    odbc_config --cflags

and by looking at the header created by the driver manager build 
unixodbc_conf.h

But if the driver is not built on that machine, there is no way of 
enforcing consistency

-- 
Nick Gorham
Easysoft Limited
http://www.easysoft.com, http://www.unixODBC.org

_______________________________________________
unixODBC-dev mailing list
[email protected]
http://mail.easysoft.com/mailman/listinfo/unixodbc-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.