I have an insert in a table using ODBC 3.0 on Oracle 10g that does not work, and I have no idea why. The database is in Windows Server 2003. The client is in Windows XP.
Table:
CREATE TABLE test ( testcol NUMBER(20,0) NULL );
ODBC calls:
SQLAllocHandle(SQL_HANDLE_STMT) = SQL_SUCCESS SQLPrepare(INSERT INTO test (testcol) VALUES (?);) = SQL_SUCCESS SQLINTEGER nStrLen = 0; __int64 nInt64 = 99; SQLBindParameter(hStatement, 1, SQL_PARAM_INPUT, SQL_C_SBIGINT, SQL_BIGINT, 20, 0, &nInt64, 0, &nStrLen) = SQL_SUCCESS SQLExecute() = SQL_ERROR SQLGetDiagRec(1) = SQL_NO_DATA
SQLBindParameter is successful, but then SQLExecute fails. There is no diagnostic message.
I had to resort to writing int64 in a string and tying it as a string. Is this the only way to bind int64?
source share