[unixODBC-dev] sizeof SQL_ATTR_TXN_ISOLATION value

Nick Gorham nick at lurcher.org
Thu Aug 21 09:51:21 BST 2014

On 21/08/14 01:12, Chris Golledge wrote:
> The Microsoft definition for the value is "A 32-bit bitmask ...".  The 
> unixODBC driver manager implements this value as an int (SQLINTEGER). 
>  The size of the int type is platform dependent.  On little endian 
> systems, it works out OK for my driver to write only the first 32 bits 
> (at least if the variable is initialized), but on a 64-bit, big endian 
> system, like AIX (and I think Solaris), the app reading the value as a 
> 64-bit integer when the driver has written the value into the high 
> order bytes does not work.

But SQLINTEGER is not a platform dependent type. Its always 32 bit, it 
should map to whatever type is 32 bit signed on that platform. Once you 
remove that confusion I think the rest of the problem goes away.

If your platform gives you sizeof( SQLINTEGER) != 4 then thats the 
problem to look at.

BTW, you should preferably join the list to post.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-dev/attachments/20140821/3da910e5/attachment.html>

More information about the unixODBC-dev mailing list