Re: Returning Error in Stored Procedures
Date: Mon, 9 Jul 2001 15:55:05 -0400
Message-ID: <9id26r$cne2_at_biko.telecom.ups.com>
Have a OUT parameter in your procedure and assign the error code or the error message to this parameter.
For example,
create or replace procedure insert_into_table ( ErrCd OUT NUMBER )
as
begin
/*** Initialize the ErrCd to 0 ***/ ErrCd := 0; insert into ......
exception
when others then
ErrCd := SQLCODE;
end;
In your VB application, after calling this procedure check for this OUT parameter value, if it is not equal to 0 then there is an error.
Eddie wrote in message ...
I was wondering if there was a way the I can return an error code from
a stored procedure that I have in Oracle. I basically just call one
insert statement in my stored procedure. I execute the store
procedure from a Visual Basic Applicaiton. I didn't know if there was
a way to do any Error Trapping for the successful execution of the
store procedure and return this error code back to Visual basic.
Eddie Received on Mon Jul 09 2001 - 21:55:05 CEST