Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Interfacing to Oracle Stored Procedures
Message
From
17/11/1999 03:37:45
 
 
To
16/11/1999 13:42:38
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00291553
Message ID:
00291802
Views:
16
Hi...

I have also been searching for this solution.....
I do know how to return a result set from a stored procedure...
But I can't make it work with VFP.

Here's how to do it..
U use something called a "ref cursor"


create or replace package types
as
type cursortype is ref cursor;
end;
/

create or replace function sp_listemp return types.cursortype
as
l_cursor types.cursortype;
begin
open l_cursor for select recno,mainkey from emp;
return l_cursor;
end;
/

SQL Plus code
************
variable c refcursor
exec :c :=sp_listemp

print c


If you want it I have an example in C how to call this function from VC++
Maybe you could get a record set out of it somehow from a DLL
created in C+++

HTH..
Of course let me in on it if you guys figure it out...

PS:
I went back to straight SELECT statements I took the ORACLE DBA course and they said there is no performance improvement in packaging
select statements into stored procedures as long as you make the SQL resusable..

But this is open to debate
Previous
Reply
Map
View

Click here to load this message in the networking platform