Re: Problemes with trigger

From: Jonathan Wayne Ingram <jwingram_at_whale.st.usm.edu>
Date: 1995/04/27
Message-ID: <3np6r6$q6a_at_server.st.usm.edu>#1/1


Martin Miron (minto_at_info.polymtl.ca) wrote:
: Hy,
 

: I have a problem with ORacle's trigger. I'm trying to use
: the function :
 

: raise_application_error
 

: within a trigger in order to stop the update of a table and
: issue a customised error.
 

: The function does in fact stop the execution of the update , and
: isssue the right customised message, but when the application
: see that the update is stopped, it returns (or ORacle returns) two other
: messages saying that there was an execution error in the trigger.
 

: How can yu avoid the displaying of the two last message? Or, how do
: , or can you stop the execution of an update from within a trigger (
: BEFORE or AFTER one?

As far as I know, you cannot stop the second error from being displayed. And also as far as I know, raising an error or an exception is the only way to stop the actions poerformed in a PL/SQL block. You might try just using the return built-in, but I have never used it from a database trigger.

: Thanks!
 

: MArtin Miron
 

: e-mail: minto_at_info.polymtl.ca
: Martin.Miron_at_dmr.ca

Good luck!

Jonathan Received on Thu Apr 27 1995 - 00:00:00 CEST

Original text of this message