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 -> Oracle trigger... strange...

Oracle trigger... strange...

From: <sorchu_bf_at_hotmail.com>
Date: 11 May 2005 09:31:45 -0700
Message-ID: <1115829105.741919.184140@g43g2000cwa.googlegroups.com>


Dear all,

I wonder if anyone has come acrossed this problem, I have a trigger like the following

CREATE OR REPLACE TRIGGER AREA_TRIG
BEFORE INSERT OR UPDATE
ON AREA
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
DECLARE
BEGIN

	:NEW.TX_ID := Tx_Mgt.get_current_tx;
	BEGIN
	 DELETE FROM TX WHERE TX.TX_ID = :OLD.TX_ID;
	   EXCEPTION WHEN OTHERS THEN
	     IF (SQLCODE != -2292) THEN -- ORA-02292: INTEGRITY CONSTRAINT are
OK
	      RAISE;
	     END IF;
	END;

END; The exception 2292 is not ignored and has been thrown to Java even though the exact piece of code works and caught the exception when I run it stand alone i.e. not within the trigger, can anyone tell me what's wrong with this?

Thx Received on Wed May 11 2005 - 11:31:45 CDT

Original text of this message

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