Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do i call a stored procedure with multiple outputs?

380279Jan 18 2006 — edited Jul 10 2007
Hi!

I'm trying to call an oracle stored procedure with multiple outputs where one of them is a record set. Does anyone know how to do this? I have no problems calling procedures that just return a record set and theres is also not a problem to call a procedure that returns many single values.

The procedure has the following kind of signature:
procedure doSomething (
inputvariable IN NUMBER,
outputvariableOne OUT NUMBER,
outputvariableTwo OUT VARCHAR2,
outputRecordSet OUT curRecords);

Where curRecords is defined as:
TYPE curRecords IS REF CURSOR;

Regards,
Bjorn Boe

Comments

james_sutherland
How have you tried to call this and what result did you get?

I assume you are using the cursored output parameter support in TopLink's StoredProcedureCall. When this is used the cursor is treated as the result set and the returned rows will come from the cursor. The additional output parameters can be accessed through a SessionEventListener using the outputParametersDetected SessionEvent.
380279
Thanks!

The outputParametersDetected SessionEvent did the trick! Thanks a lot!

-bjorn
487035
Hi there,
I am new to toplink and am calling a procedure which returns me 2 resultsets. I am using the code:

call = new StoredProcedureCall();
call.setProcedureName("pGetPearDetailForSearch");
call.addNamedArgumentValue("PearIds",listConcatenatedPearIds);
Vector searchDetails = uow.executeSelectingCall(call);

This way i am not getting the vector for the 2nd resultset which gets me a 2nd set of results.
What code do i have write to traverse the 2nd resultset being returned from the Procedure.

regards
Kamal
zb
Check out this thread. The code is at the bottom.
Zev.

1295450
587238
Someone have a working example how to call a stored procedure with multiple output parameters, and of course read them?
Using outputParametersDetected?
Thanx a lot.
1 - 5
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 7 2007
Added on Jan 18 2006
5 comments
2,310 views