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

Re: Oracle trigger... strange...

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Wed, 11 May 2005 12:14:58 -0700
Message-ID: <1115838647.506536@yasure>


sorchu_bf_at_hotmail.com wrote:
> 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

How is the value of Tx_Mgt.get_current_tx not always NULL?

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Wed May 11 2005 - 14:14:58 CDT

Original text of this message

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