Home » Developer & Programmer » Forms » raise_application_error
raise_application_error [message #302365] Mon, 25 February 2008 06:12 Go to next message
Messages: 83
Registered: September 2007
Location: India
Hi all,
I have a database procedure which includes the code
if Qty < 0 then
raise_application_error(-20200, 'Quantity cannot be less than zero');
end if;
It is running correctly in SQL as this is showing 'Quantity cannot be less than zero' message. But when i call this procedure from froms, when the condition becomes true, one error is coming in forms as 'When-validate-item trigger raised unhandled exception ora-20200 (40735)'. Error number showing is the number which i gave in raise_application_error(). Can anyone help me to find why this is occuring. Actually it should display 'cannot be less than zero'. Please help.......

Thanks and regards
Re: raise_application_error [message #302371 is a reply to message #302365] Mon, 25 February 2008 06:45 Go to previous messageGo to next message
Messages: 21127
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You could create an OUT parameter (in this procedure) and return the message to the form (and display it to end user).
Re: raise_application_error [message #302505 is a reply to message #302365] Mon, 25 February 2008 23:56 Go to previous message
Messages: 10180
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I think you need to do your own exception handling.

Search this forum for 'error_code' and 'error_text'.

Previous Topic: how to search form level packages
Next Topic: How to remove Oracle logo?
Goto Forum:

Current Time: Sun Jul 23 09:58:53 CDT 2017

Total time taken to generate the page: 0.04354 seconds