Home » Developer & Programmer » Forms » How to trap Oracle server errors in Forms
How to trap Oracle server errors in Forms [message #79467] Wed, 12 June 2002 09:04 Go to next message
Swamy
Messages: 78
Registered: June 2002
Member
I am using Forms 6i. I want to trap Oracle server errors like "ORA-06503/ORA-01034" while running forms application. Please help.
Re: How to trap Oracle server errors in Forms [message #79468 is a reply to message #79467] Wed, 12 June 2002 10:37 Go to previous messageGo to next message
Tyler
Messages: 123
Registered: January 2002
Senior Member
The following code will be placed in the button or whatever item will cause the error that you want to trap.

DECLARE

E_ERROR EXCEPTION;
PRAGMA EXCEPTION_INIT(E_ERROR,-22222);

BEGIN

...

EXCEPTION

WHEN E_ERROR THEN
MESSAGE('this is ora error message number 22222');

end;
Re: How to trap Oracle server errors in Forms [message #79472 is a reply to message #79467] Wed, 12 June 2002 21:50 Go to previous messageGo to next message
Subhash
Messages: 105
Registered: October 2001
Senior Member
Try this code in ur On-Error Trigger

DECLARE
errtxt VARCHAR2(2000) := ERROR_TEXT;
dberrnum NUMBER := DBMS_ERROR_CODE;
dberrtxt VARCHAR2(2000) := DBMS_ERROR_TEXT;
BEGIN
If Instr(errtxt,'ORA',1) != 0 then
Message('ERROR : '||dberrtxt);
RAISE Form_Trigger_Failure;
End If;

END;

Regards
Subhash
Re: How to trap Oracle server errors in Forms [message #81363 is a reply to message #79467] Mon, 10 February 2003 13:13 Go to previous message
ram
Messages: 95
Registered: November 2000
Member
user sqlcode & sqlerrm and get the errors!!
Previous Topic: posting
Next Topic: Re: Diff between forms6 and 6i
Goto Forum:
  


Current Time: Thu Apr 25 04:38:42 CDT 2024