dbTalk Databases Forums  

How to Handle Forms Error in Triggers??

comp.databases.oracle.tools comp.databases.oracle.tools


Discuss How to Handle Forms Error in Triggers?? in the comp.databases.oracle.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Aaron V
 
Posts: n/a

Default How to Handle Forms Error in Triggers?? - 07-15-2003 , 02:35 PM






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?

Thanx,

Aaron V




Reply With Quote
  #2  
Old   
Daniel Morgan
 
Posts: n/a

Default Re: How to Handle Forms Error in Triggers?? - 07-15-2003 , 06:51 PM






Aaron V wrote:

Quote:
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?

Thanx,

Aaron V
Other than using SHOW_ALERT ... what is wrong with your code?

--
Daniel Morgan
http://www.outreach.washington.edu/e...ad/oad_crs.asp
damorgan@x.washington.edu
(replace 'x' with a 'u' to reply)




Reply With Quote
  #3  
Old   
Aaron V
 
Posts: n/a

Default Re: How to Handle Forms Error in Triggers?? - 07-22-2003 , 05:46 PM




"Daniel Morgan" <damorgan (AT) exxesolutions (DOT) com> wrote

Quote:
Aaron V 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?

Thanx,

Aaron V

Other than using SHOW_ALERT ... what is wrong with your code?

-
The code Does NOT catch the error...grr! I could handle this with ON-ERROR
trigger. But I want to know how to Handle Forms Errors (FRM-XXXX) in the
Exception Area
if it's Possible. Is there a way to Catch Forms Errors like Exception_init
Works with ORA errors??

Thanks Again,

Aaron V.

-
Quote:
Daniel Morgan
http://www.outreach.washington.edu/e...ad/oad_crs.asp
damorgan@x.washington.edu
(replace 'x' with a 'u' to reply)





Reply With Quote
  #4  
Old   
Daniel Morgan
 
Posts: n/a

Default Re: How to Handle Forms Error in Triggers?? - 07-22-2003 , 07:33 PM



Aaron V wrote:

Quote:
"Daniel Morgan" <damorgan (AT) exxesolutions (DOT) com> wrote in message
news:3F149393.BC684CC (AT) exxesolutions (DOT) com...
Aaron V 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?

Thanx,

Aaron V

Other than using SHOW_ALERT ... what is wrong with your code?

-

The code Does NOT catch the error...grr! I could handle this with ON-ERROR
trigger. But I want to know how to Handle Forms Errors (FRM-XXXX) in the
Exception Area
if it's Possible. Is there a way to Catch Forms Errors like Exception_init
Works with ORA errors??

Thanks Again,

Aaron V.

-
Daniel Morgan
http://www.outreach.washington.edu/e...ad/oad_crs.asp
damorgan@x.washington.edu
(replace 'x' with a 'u' to reply)


Trap the error at the form level in the ON-ERROR trigger trapping for the
original message from the database.

--
Daniel Morgan
http://www.outreach.washington.edu/e...ad/oad_crs.asp
damorgan@x.washington.edu
(replace 'x' with a 'u' to reply)




Reply With Quote
  #5  
Old   
Jeff
 
Posts: n/a

Default Re: How to Handle Forms Error in Triggers?? - 07-23-2003 , 07:51 AM



In article <99jTa.111694$sY2.48811 (AT) rwcrnsc51 (DOT) ops.asp.att.net>, "Aaron V" <Tinkerist (AT) hotmail (DOT) com> wrote:

Quote:
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.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.