Home » Developer & Programmer » Forms » on-error trigger does not trap ORA-28002
on-error trigger does not trap ORA-28002 [message #122853] Wed, 08 June 2005 15:57 Go to next message
vinodkumarn
Messages: 60
Registered: March 2005
Member
I have an on-error trigger as below to trap ORA-28002 which is for conveying user that their passowrd is getting expired, but my customized error message is not showing up. I mean the ON-ERROR trigger DOES NOT fire.

DECLARE
lv_errcod NUMBER := ERROR_CODE;
lv_errtyp VARCHAR2(3) := ERROR_TYPE;
lv_errtxt VARCHAR2(80) := ERROR_TEXT;
BEGIN
IF (lv_errcod = 28002) THEN
message('Password is Expiring shortly.');
ELSE
message(lv_errtxt);
RAISE Form_Trigger_Failure;
END IF;
END;

can anyone let me know what is the problem here.
we are using forms 6i and is web based application
Re: on-error trigger does not trap ORA-28002 [message #122854 is a reply to message #122853] Wed, 08 June 2005 16:02 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Doesn't this error occur BEFORE the actual Oracle connection has been made? Forms doesn't kick in but after a connection has been made, at least if I'm not mistaken...someone correct me if I'm wrong.


MHE
Re: on-error trigger does not trap ORA-28002 [message #122856 is a reply to message #122853] Wed, 08 June 2005 16:14 Go to previous messageGo to next message
vinodkumarn
Messages: 60
Registered: March 2005
Member
No actually ORA-28002 means the password is going to expire in 'XX' number of days

ORA-28002-> the password will expire within string days

He is a valid user and it connects to database and then it gives a error message.

Right now after i implemented the on-error trigger, i am getting the message "ORA-28002: the password will expire within 10 days"

but i do not want this message to appear, i want to my own message to appear
Re: on-error trigger does not trap ORA-28002 [message #122860 is a reply to message #122856] Wed, 08 June 2005 16:29 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Ok, I don't have any Oracle near me so this have to come from memory ( and google Wink )

Don't you want DBMS_ERROR_CODE instead of ERROR_CODE? It might be possible that Forms throws in an FRM-NNNNN on top of the server's message.

Regards,
MHE
Re: on-error trigger does not trap ORA-28002 [message #122861 is a reply to message #122853] Wed, 08 June 2005 16:34 Go to previous messageGo to next message
vinodkumarn
Messages: 60
Registered: March 2005
Member
how do i do this with dbms_error_code, can u give me the code please
Re: on-error trigger does not trap ORA-28002 [message #122862 is a reply to message #122861] Wed, 08 June 2005 16:41 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Just the same as ERROR_CODE. DBMS_ERROR_CODE will return the negative number code of the first error on the stack, so the real ORA error from the server.

I'm sure you can look it up in the Forms Help.

You could ( and should ) test this via some messages...

There's also a DBMS_ERROR_TEXT if I'm not mistaken.

MHE
Re: on-error trigger does not trap ORA-28002 [message #122999 is a reply to message #122853] Thu, 09 June 2005 09:34 Go to previous messageGo to next message
vinodkumarn
Messages: 60
Registered: March 2005
Member
I wrote this code the following code after BEGIN to check the DBMS_ERROR_CODE and the message does not come up

Message('ErrCode='||lv_errcod||' DBMS_Err='||DBMS_ERROR_CODE);
Message(' ',no_acknowledge);

i mean the on-error trigger is not firing at all.

can anybody help me here
Re: on-error trigger does not trap ORA-28002 [message #137177 is a reply to message #122853] Tue, 13 September 2005 10:44 Go to previous messageGo to next message
itsplato
Messages: 1
Registered: September 2005
Location: India
Junior Member
Hi,

I suppose that this is not an error but just a warning message,
so try it in ON-MESSAGE instead.

Regards,
P.Plato
Re: on-error trigger does not trap ORA-28002 [message #137191 is a reply to message #122853] Tue, 13 September 2005 12:52 Go to previous message
jkong21
Messages: 6
Registered: September 2005
Location: Mauritius
Junior Member
Like someone said try the dbms_error
Previous Topic: how to protect selecting same row from the LOV..........
Next Topic: read Special image
Goto Forum:
  


Current Time: Fri Sep 20 05:54:17 CDT 2024