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: Trouble passing exception

Re: Trouble passing exception

From: Malcolm Dew-Jones <yf110_at_vtn1.victoria.tc.ca>
Date: 28 Mar 2005 16:02:32 -0800
Message-ID: <42489b18@news.victoria.tc.ca>


mike (hillmw_at_charter.net) wrote:

(various snipped)

: I'm pretty new to pl/sql and having trouble passing exceptions between
: my sql and procedures.

: my procedures are:

: create or replace procedure update_me (
: x_param1 in varchar2,
: x_param2 in varchar2,
: ) AS
: begin
: UPDATE mytbl
: SET myfield2 =3D x_param2,
: WHERE myfield1 =3D x_param1;
: exception when no_data_found then

It is not an exception to update zero rows.

Lookup SQL%ROWCOUNT for a way to do what you want.

: raise_application_error(-20101=AD, 'No Data');
: end update_me;

--

This space not for rent.
Received on Mon Mar 28 2005 - 18:02:32 CST

Original text of this message

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