Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Oracle triggers not always firing
Hi Lisa,
could id be something as simple (!) as a data error which causes an exception to fire. If the exception is handled in the trigger code and not re-raised then the trigger is assumed to have worked ok, but may not have made the changes you expect. The trigger is firing, just not doing what it should because something went wrong and was 'handled' by exception handling in the trigger.
create trigger blah
before update on blah_blah
for each row
...
begin
do code here which could raise an exception exception
when stuff process stuff here raise when other_stuff process other stuff here raise when others then null end
If the exceptions isn't handled explicitly, then the 'others' path is taken, but the exception is not raised again, the system assumes that the trigger worked because the exception was not passed out of the trigger. So, the update goes ahead, but without data from the trigger.
Cheers,
Norman.
--
(Delete a Microsoft database name to reply - clue, mssql !)
-----Original Message-----
From: Lisa McGrath [mailto:lmcgrath_at_uwsa.edu]
Posted At: Friday, June 20, 2003 1:48 PM
Posted To: server
Conversation: Oracle triggers not always firing
Subject: Re: Oracle triggers not always firing
Jim,
thanks for the reply. The transaction is committing. I can check the
table the
next day and the updates are there, so the commit must work, but the
changes
that should have been made by the trigger are not there.
Lisa Received on Fri Jun 20 2003 - 09:50:17 CDT