Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> How can I USE OLE DB and REF CURSOR of Oracle in VC?
I'm using VC++ 6.0 with OLE DB to access data in Oracle 9i.
The problem is calling stored procedures in Oracle that returns data. Oracle stored procedures can't return recordsets (like stored procedures in SQL Server can), and i cna't get some return recordsets back to VC++.
An example: If I have the Oracle stored procedure (PL/SQL code):
CREATE OR REPLACE PACKAGE test_data IS
TYPE printlist_cur IS REF CURSOR;
PROCEDURE test_printinglist(p_cur OUT printlist_cur);
END test_data;
CREATE OR REPLACE PACKAGE BODY test_data IS
PROCEDURE test_printinglist(p_cur OUT printlist_cur) IS
v_sql VARCHAR2(1000);
BEGIN
v_sql := 'select * from sbnetinfo;';
OPEN p_cur FOR v_sql;
END test_printinglist;
END test_data;
How can I call this procedure from VC++ and get the variable p_cur back?
In advance, thanks for your help.
Regards,
Meere. Received on Thu Mar 02 2006 - 05:56:08 CST
![]() |
![]() |