[HELP]: PL/SQL Exceptions to Forms4.
Date: 1995/11/27
Message-ID: <Pine.A32.3.91.951127155717.28046A-100000_at_pilot.stu.cowan.edu.au>#1/1
Howdy.
Hope you can help me.
Have implemented the following trigger in SQL*+ PL/SQL:
CREATE TRIGGER AFFILIATION_TRIGGER
BEFORE INSERT OR UPDATE OF Start_Date, End_Date ON Affiliation
FOR EACH ROW
DECLARE
My_Exception EXCEPTION;
BEGIN
IF :New.Start_Date > :New.End_Date THEN
RAISE My_Exception;
END IF;
END;
/
What the trigger is simply meant to do is ensure that start_date is less than or equal to end_date. If not it should call the exception My_Exception.
Now when I goto Forms4 and create a form on table affiliation, I do get a raised error if the condition is true (ie start_date > end_date). However Oracle comes up with its standard FRM-40508: ORACLE err - unable to INSERT record. I don't want this. I want to capture this error and display a user friendly error to the message.
How do I capture the exception?
Note that I have not declared the exception in the PL/SQL or the Forms4. It is as is above.
Hope you can help, and thanks in advance :>
Please send any reply to email address below.
Chris.
*CHRIS MUIR********************************************************************
- "Destiny is not a matter of chance, it is a matter of choice; it is not a *
- thing to be waited for: it is a thing to be achieved." *
*st952943_at_Pilot.Stu.Cowan.Edu.Au***EDITH COWAN UNIVERSITY OF WESTERN AUSTRALIA*