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

Home -> Community -> Usenet -> c.d.o.server -> Re: Coding for ORA-02291 in Pl/SQL

Re: Coding for ORA-02291 in Pl/SQL

From: Sybrand Bakker <sybrandb_at_hccnet.nl>
Date: Mon, 31 Jan 2005 23:22:15 +0100
Message-ID: <ppbtv0h6br34pc5rtgjjllls23as4t7hsa@4ax.com>


On 31 Jan 2005 14:04:30 -0800, "dfosgate_at_llbean.com" <dfosgate_at_llbean.com> wrote:

>Hi,
>
>I want to trap an execption from a table insert where the Oracle
>exception code will be ORA-02291 . Can I code the exception as follows:
>
>--
>-- INSERT INTO PRICE_LIST_DTL for CATG within CLASS
No it won't

You need to have the following in your code

declare
exception_to_be_trapped exception;
pragma exception_init(-2291, exception_to_be_trapped); begin
<< etc>>
exception
when exception_to_be_trapped then

--
Sybrand Bakker, Senior Oracle DBA
Received on Mon Jan 31 2005 - 16:22:15 CST

Original text of this message

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