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 -> Problem with triggers

Problem with triggers

From: Olaf Hansen <oha_at_is.informatik.uni-kiel.de>
Date: Tue, 04 May 1999 13:28:27 +0200
Message-ID: <372ED9DB.960@is.informatik.uni-kiel.de>


Hi,

I'm working with Oracle7.x and WindowsNT.

Now I have the following problem with triggers :

The goal:
When updating a row in table X a trigger (before update) is called. If a defined condition is met I want the trigger to insert a row in table Y and refuse the update for table X (for example by raising an application error).

My problem now is that raising an application error (for refusing the update on table X) implies a complete rollback of the transaction (including rollback the insert on table Y).

Do anyone know a solution for this ?

It must be guarantied that noone can change table X between checking the defined condition and doing the update (or no update, depending on the condition) of table X.

                Thanks, Olaf

Olaf Hansen

Student of Computer Science
at University of Kiel, Germany

oha_at_is.informatik.uni-kiel.de Received on Tue May 04 1999 - 06:28:27 CDT

Original text of this message

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