[unixODBC-support] Prepared statements and parameters binding: wrong bound value with long type
nick.gorham at easysoft.com
Thu Jul 12 14:54:09 BST 2007
>I'm working in C on a Red Hat and accessing a DB2 server using unixODBC
>All I want to do is a simple select prepared statement and it's working fine
>when the value I try to bind is not too high. The variable I want to bind is
>a long value (sizeof(long) on my machine is 8).
Use SQL_C_SBIGINT or SQL_C_UBIGINT, SQL_C_LONG always maps to a 4 byte
value (int in your case I guess).
More information about the unixODBC-support