Re: How to Handle Forms Error in Triggers??
Date: Wed, 23 Jul 2003 12:51:47 GMT
Message-ID: <bfm0d1$lt5$1_at_cronkite.cc.uga.edu>
In article <99jTa.111694$sY2.48811_at_rwcrnsc51.ops.asp.att.net>, "Aaron V" <Tinkerist_at_hotmail.com> wrote:
>> > I'm trying to handle an error in the Exception area of the code, but the
>it
>> > is a Forms error(FRM)
>> > not a DataBase error (ORA). Something to the effect of this...
>> >
>> > DECLARE
>> > bool_tf BOOLEAN;
>> > NO_LOV_DATA EXCEPTION;
>> > PRAGMA EXCEPTION_INIT(NO_LOV_DATA, -41830);
>> > BEGIN
>> > bool_tf := SHOW_LOV('LOV_DEPENDENTS');
>> > EXCEPTION
>> > WHEN NO_LOV_DATA THEN
>> > MESSAGE('No Data Returned For LOV',ACKNOWLEDGE);
>> > END;
>> >
>> > Is there a way to do something like this locally, without a ON-ERROR
>> > trigger??
>> > In this case I could pre-test the LOV by executing the same Select
>> > Statement,
>> > but in general, is there a way to handle FRM errors In the Same Code
>Block?
Put simply, no. The -41830 is going to be an ORA-41830 error (whatever that is) because the PRAGMA stuff is just PL/SQL, which doesn't really know anything about FRM errors. The FRM error is trapped by Forms before execution resumes from SHOW_LOV. You MUST handle Forms errors in the on-error trigger or Forms will handle them for you... either by messaging (if you don't have an on-error trigger) or ignoring the error (if you have an on-error trigger) and by possibly setting a Forms flag, which you may or may not (bet not) be able to test for success or failure and raise your own exception in your PL/SQL block. Received on Wed Jul 23 2003 - 14:51:47 CEST
