Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> ODBC, stored proc, cursor return type
I am using the Oracle ODBC driver. In my C++ code, I can bind a stored procedures output, call the stored procedure and get the correct answer. But only if the return type is in the SQLBindParameter data type list. This is a problem if the stored procedure returns a cursor variable.
If anyone has any experience calling a stored procedure that returns a cursor, from C/C++ code, through ODBC, I would appreciate any hints. I am used to the following syntax for a stored procedure that returns an integer. I was trying the same ODBC calls but with a fetch for a stored procedure that returns a cursor variable.
retcode = SQLBindParameter(hstmt, 1, SQL_PARAM_OUTPUT, SQL_C_SLONG, SQL_INTEGER, 0,0,
&accountNo,
0,
&cbAccountNo); // cbAccountNo = SQL_NTS
retcode = SQLPrepare(hstmt, (unsigned char *)"{call get_next_account_no(?)}", 30); retcode = SQLExecute(hstmt);
Thanks in advance!
Mary
Received on Thu Jan 22 1998 - 00:00:00 CST
![]() |
![]() |