Trap database error- ORA-02391, urgent [message #121885] |
Wed, 01 June 2005 10:58 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
vinodkumarn
Messages: 60 Registered: March 2005
|
Member |
|
|
I am running oracle forms 6i on web and have set sessions_per_user=1 and when user try to login with same user id second time, i want the application to display my own customized error message instead of default. i have written the following code in on-error trigger and is not working, can anyone let me know what is the problem here.
DECLARE
errnum number;
errtyp varchar2(3);
BEGIN
errtyp := ERROR_TYPE;
IF(errtyp='ORA') THEN
errnum := DBMS_ERROR_CODE;
END IF;
IF errnum= -02391 then
MESSAGE('User with this name is already logged in. Login denied.');
RAISE Form_Trigger_Failure;
END IF;
END;
|
|
|
Re: Trap database error- ORA-02391, urgent [message #121951 is a reply to message #121885] |
Wed, 01 June 2005 19:49 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/67467.jpg) |
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Either, duplicate your message command or put a pause command after the message command or put a synchronize after the message command or put a 'null' message command with no_acknowledge after the message command.
There is a glitch in forms in that the last message command before a raise FTF is not always displayed.
David
|
|
|