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: raise_application_error in before delete trigger.

Re: raise_application_error in before delete trigger.

From: Tim Belding <Tim_Belding_at_Dell.com>
Date: Mon, 21 May 2001 11:20:10 -0500
Message-ID: <9ebf7s$2h06$1@galaxy.us.dell.com>

Hi,

Thanks for the explanation...

Tim.

Sybrand Bakker <postbus_at_sybrandb.demon.nl> wrote in message news:tg5gmd3tv9t095_at_beta-news.demon.nl...
>
> "Tim Belding" <Tim_Belding_at_Dell.com> wrote in message
> news:9du84g$219e$1_at_galaxy.us.dell.com...
> > Hi,
> >
> > Can you use this function in a trigger to stop an unwanted deletion?
> >
> > It throws the error we define, but also some Oracle errors as well:
> > ORA-20001: Cannot delete record because of status.
> > ORA-06512: at "RMS_DATA.JIA_STATUS_CHECK", line 30
> > ORA-04088: error during execution of trigger 'RMS_DATA.JIA_STATUS_CHECK'
> >
> > If not how would you stop a deletion from occurring in a trigger?
> >
> >
>
> This is just the way it usually works.
> The two Ora - error messages are free of charge by the house. So your code
> is working as expected.
>
> Second question : can I get rid of the two ora-error messages.
> Yes but in that case your trigger has to trap the exception and you need
 to
> use the dbms_utility.format_error_stack procedure to have it properly
> formatted.
> IMO, not worth the trouble.
>
>
> Hth,
>
> Sybrand Bakker, Oracle DBA
>
>
>
Received on Mon May 21 2001 - 11:20:10 CDT

Original text of this message

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