0
votes

Would any of you know why the call in ODBC SQLPrepare(.) makes SQLExecute(.) fail (returning SQL_ERROR) when a BLOB type is used for the PL/SQL stored-procedure OUT parameter while VARCHAR2, NUMBER, etc. works fine as OUT parameter? The stored procedure with the BLOB OUT parameter works fine when called from within Oracle (SQL Developer).

My C++ code: sqlReturnCode = SQLPrepare( OracleStatementHandle, (SQLCHAR*)"{call package_one.param_test_proc(?)}", SQL_NTS );

1
How do you bind the corresponding buffer? I guess you first call SQLBindParamater(...); and then call SQLPrepare? If yes, can you show us how you bind the BLOB parameter? I guess that the error is caused by an incorrect binding. - erg
I found out why (please see reason in Answer section below). Thank you for looking at this problem! (: - Jon

1 Answers

0
votes

One of our DBAs found this about the driver we’re using:

https://msdn.microsoft.com/en-us/library/ms713590%28v=vs.85%29.aspx

“Important This feature will be removed in a future version of Windows. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Instead, use the ODBC driver provided by Oracle.”

There are support notes that explicitly state that they do not support CLOB/BLOB data types etc: https://msdn.microsoft.com/en-us/library/ms710205%28v=vs.85%29.aspx