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 -> Replacing default column constraint violation messages in Forms...

Replacing default column constraint violation messages in Forms...

From: Mark S. Reichman <reichmanm_at_removethis.rl.af.mil.>
Date: 29 Jul 98 14:30:25 GMT
Message-ID: <35bf3201.0@news.rlcn.rl.af.mil>


I am trying to move all of my pre-update and pre-insert validation triggers from the 3.0 form level to the database trigger level.

I wrote the following test trigger. It is only a test trigger and will not be used. Problem is, the message that I put in the RAISE_APPLICATION_ERROR does not show up in the form. The trigger does work and halts the insert or update when a date is input greater that 2000, but the error message in the form is "FRM-40508: ORACLE error -- unable to INSERT record." How do I overide this message with my own personal message. Good answers recieve a free cookie..

CREATE OR REPLACE TRIGGER JUNK_DATE
AFTER INSERT OR UPDATE ON JUNK FOR EACH ROW BEGIN
  IF :NEW.DATE2 >= TO_DATE('01-JAN-2000','DD-MON-YYYY') THEN     RAISE_APPLICATION_ERROR(-20100,
    'ERROR: This date is greater than the year 2000');   END IF;
END;
.
/

                     -Mark

Received on Wed Jul 29 1998 - 09:30:25 CDT

Original text of this message

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