Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie question 1

Status
Not open for further replies.

IonelBurtan

Programmer
May 25, 2001
601
RO
I am coming from MSSQL (3 years)
Now I have to work with Oracle. I just learn the basics/

I am intereseting in a few Q&A on Oracles stored procedures(probably silly questions):
- how can I make a procedure that returns a recordset?
(If I just simply put a select * from XXX in a proceudre it says it expects an INTO from me)
- does Oracle suports returning more than oen receordset from a SP.
- What is the simplest way I can test a recordset returned from Oracle in VB with ADO

Any help apreciated,

s-)

Blessed is he who in the name of justice and goodwill, sheperds the weak through the valley of darkness...
 
Code:
create procedure getRecordsets(pEmp out sys_refcursor
                               ,pDept out sys_refcursor)
is
begin
  open pEmp for select * from emp;
  open pDept for select * from dept;
end;

Regards, Dima
 
Thank you. The fist two questions are answered.
How about the third one?
I have succeded in returning multiple recordsets from Oracle. but I cannot read them in ADO.
The method NextRecordset of ADODB.Recordset raises an error like that:

"Object or provider is not capable of performing requested operation."

So, if I am returning multiple recordsets - how can I read them. Otherwise - there is no use of point 1 and 2 for my application.

Thanks,

s-)

Blessed is he who in the name of justice and goodwill, sheperds the weak through the valley of darkness...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top