Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Trouble passing exception
I'm pretty new to pl/sql and having trouble passing exceptions between
my sql and procedures.
I have my basic sql:
begin
update_me('param1','param2', ....);
exception when no_data_found then
insert_me('param1','param2', ....);
end;
my procedures are:
create or replace procedure update_me (
x_param1 in varchar2,
x_param2 in varchar2,
) AS
begin
UPDATE mytbl
SET myfield2 = x_param2,
WHERE myfield1 = x_param1;
exception when no_data_found then
raise_application_error(-20101, 'No Data');
end update_me;
The raise_application error is not being received, because I have know data that is not getting inserted.
Any help is appreciated.
Mike Received on Mon Mar 28 2005 - 17:34:54 CST
![]() |
![]() |