Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Interfacing to Oracle Stored Procedures
Message
De
17/11/1999 03:37:45
 
 
À
16/11/1999 13:42:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00291553
Message ID:
00291802
Vues:
15
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform