Binding int64 (SQL_BIGINT) as query parameter causes error during execution in Oracle 10g ODBC

后端 未结 1 670
庸人自扰
庸人自扰 2021-01-06 19:10

I\'ve got an insert into a table using ODBC 3.0 on Oracle 10g that is failing and I have no idea why. The database is on Windows Server 2003. The client is on Windows XP.

相关标签:
1条回答
  • 2021-01-06 19:50

    The Oracle 10g Admin Guide in Appendix G.1 says that the Oracle 10g ODBC driver does not support either SQL_C_SBIGINT or SQL_C_UBIGINT.

    Like you, we also find that at run time the SQLExecute() fails. And a call to SQLGetDiagRec() returns nothing, rather than a simple message like "Oracle 10g does not support SQL_C_SBIGINT", . Grr....

    Anyway, the Appendix G.1 does not say how you should bind data to send into a table with a column defined like NUMBER(20). So we all have to guess, and use whatever (undocumented) technique works. It would be nice if the Appendix G.1 gave some kind of hint or suggestion as to the "best" way.

    If converting the number to a string and then binding works for you, stick with that.

    0 讨论(0)
提交回复
热议问题