Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> retrieve stored proc results via ODBC, with REFCURSOR?

retrieve stored proc results via ODBC, with REFCURSOR?

From: chris <od488gw02_at_sneakemail.com>
Date: 6 Aug 2003 12:40:02 -0700
Message-ID: <c452700a.0308061140.45bc29c5@posting.google.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US