Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> retrieve stored proc results via ODBC, with REFCURSOR?
I'm using ORA ODBC driver 8.01.07.
I'm able to call this stored proc from SQL as follows:
SQL> variable junk REFCURSOR;
SQL> execute get_blocked_products(14170020, TO_DATE('03-15-2002
00:00:00', 'MM-DD-YYYY HH24:MI:SS'),1,2,3,:junk);
PL/SQL procedure successfully completed.
SQL> print junk;
But I'm unsure how to retrieve this data via ODBC. I'm trying this, even though I know it won't work:
sprintf(selectstatement, "call carmar_get_blocked_products(14170020, TO_DATE('03-15-2002 00:00:00', 'MM-DD-YYYY HH24:MI:SS'),1,2,3,:tempcurs);
// Prepare the SQL statement by assigning it to the statement handle
// First get the BP internal account_no
retval = SQLPrepare(hstmt, (SQLCHAR*) selectstatement,
sizeof(selectstatement));
And it fails at SQLExecute with: ORA 01008 not all variables bound.
There must be a way to do this. Thanks.
chris Received on Wed Aug 06 2003 - 14:40:02 CDT