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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Discarding Stored Proc return variables

Status
Not open for further replies.

jjob

Programmer
Jul 16, 2002
157
GB
I have an Oracle stored procedure that has 4 parameters, 2 are input, 2 output. It was written for use in an ASP script. I am about to use it in a different situation, and call it from within another stored procedure, and I do not want the second of the 2 output variables. My question is, is it possible to ignore/discard this value without creating a variable which I will never use,to accept the return value?

TIA

John
 
I think you always need a variable to accept the result. Depending on the application you are going to use the procedure in, there may exist system predefined variables which you can use. Also.. I am just curious... what may be so painful about declaring a dummy variable?
 
Hi Nagornyi,

It was simply the musings of an excessively tidy mind - I didn't want to declare a variable 'dummy' in my top level code whose only job was to match the parameters. I have done so however.

regards

John
 
An alternative option may be to overload the procedure so that it only returns one value. It does have to be in a package for this to work though.
 
That is interesting, it is in a package, but I'm laerning as I go along, and I wasn't aware that one could overload procedures - or if I did, I didn't know how and so forgot about it. I'll look that up.

Have a star for a suggestion that may yield dividends in other areas!

regards

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top