Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Return Value for a stored procedure

Re: Return Value for a stored procedure

From: Jim Kennedy <kennedy-downwithspammersfamily_at_attbi.net>
Date: Thu, 23 Oct 2003 01:34:10 GMT
Message-ID: <meGlb.602$mZ5.3983@attbi_s54>


You can use an out parameter in a stored procedure. It is a bad idea to commit in a procedure. (doable, just do commit;) You should have the caller do the commit. Otherwise, if you need to move the transaction boundary you have to edit the stored proc instead of doing it outside the procedure. Or if you need to chain them together you can't rollback if one in the middle has a commit; Additionally, you should use the error mechanism to raise errors not a return value.
Jim
"Florian Marinoiu" <x_at_x.com> wrote in message news:3F9718E6.D8C03D67_at_x.com...
> Hi,
>
> In MSSQL Server developement I used the return value of a stored
> procedure to test for different things.
>
> Is it a similar mechanism in ORACLE 8.1
>
> Let's say that in a procedure after the commit I do a RETURN 0 and if an
> error occurs in the exception section I do a RETURN -1..
>
>
> Thanks,
> Florian
>
Received on Wed Oct 22 2003 - 20:34:10 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US