[unixODBC-dev] Problem in SQLRowCount

Nick Gorham nick at lurcher.org
Mon Feb 23 13:47:59 GMT 2009


Nimish Bhargava wrote:

>Hi
>
>I am using the odbc library on CentOS 5.2 x86_64.
>I am facing a problem in SQLRowCount(SQLHSTMT , SQLLEN*) function in
>DriverManager/SQLRowCount.c.
>
>I have build the odbc library and my code with BUILD_LEGACY_64_BIT_MODE flag
>defined. Hence SQLLEN become "int" according to the definition in
>sqltypes.h.
>
>The problem occurs after the execution of macro DEF_SQLROWCOUNT (line 227).
>Instead of writing on 4 bytes (int) on rowcount it writes 8 bytes thus
>corrupting 4 bytes of the stack.
>
>Could you please look in this function or let me know if I have made some
>mistake with the odbc compilation.
>
>Thanks and Regards
>Nimish
>
>  
>
That macro just calls the function in the current driver, so I guess you 
have a driver built with sizeof( SQLLEN ) == 8

-- 
Nick


More information about the unixODBC-dev mailing list