From: David V. <da...@da...> - 2009-11-10 04:17:32
|
I'm having some problems with the Firebird ODBC driver on 64-bit Linux. I'm using the 2.0 RC1 driver, connecting to Firebird 2.1 on the same computer. This is a fragment of my code: SQLAllocHandle(SQL_HANDLE_STMT, dbc, &stmt); SQLPrepare(stmt, (SQLCHAR*) "INSERT INTO test (id,foo) VALUES (?,?)", SQL_NTS); SQLINTEGER id = 8000; SQLINTEGER foo = 4400; SQLLEN cbId, cbFoo; SQLBindParameter(stmt, 1, SQL_PARAM_INPUT, SQL_C_SLONG, SQL_INTEGER, 0, 0, &id, sizeof(id), &cbId); SQLBindParameter(stmt, 2, SQL_PARAM_INPUT, SQL_C_SLONG, SQL_INTEGER, 0, 0, &foo, sizeof(foo), &cbFoo); ret = SQLExecute(stmt); SQLExecute is generating this error: sqlstate=23000, native=-625 [ODBC Firebird Driver][Firebird]validation error for column ID, value "*** null ***" Here's the database schema: CREATE TABLE TEST ( id INTEGER, foo INTEGER DEFAULT 0 NOT NULL, CONSTRAINT TEST_PK PRIMARY KEY (ID) ); |