Trouble passing exceptions

From: mike <hillmw_at_charter.net>
Date: 28 Mar 2005 15:21:08 -0800
Message-ID: <1112052068.865160.207100_at_l41g2000cwc.googlegroups.com>



[Quoted] 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 Tue Mar 29 2005 - 01:21:08 CEST

Original text of this message