Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Replacing default column constraint violation messages in Forms...
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;
.
/
-MarkReceived on Wed Jul 29 1998 - 09:30:25 CDT
![]() |
![]() |