Home » Developer & Programmer » Forms » Raise Error Message
Raise Error Message [message #508578] Mon, 23 May 2011 04:45 Go to next message
meim
Messages: 35
Registered: July 2009
Member
Hello,


I have a form, and in one case i need to restrict the insert functionality. however, i am not allowed to do that in form level, so am trying now to have that on table level in which i use a trigger to raise error message using Raise_application_error.

Is there a way to control the place where my message should display? for now the trigger works fine, however, the error am getting is a technical message "FRM-40508: ORACLE error: unable to INSERT record " and i can only display my error message from Help > Display Error > Database Error .


Thanks,
Meim
Re: Raise Error Message [message #508592 is a reply to message #508578] Mon, 23 May 2011 05:38 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Try to capture it in ON-ERROR form level trigger, such as
if err_type = 'FRM' and err_code = 40508 then
   message('Your message here');
   raise form_trigger_failure;
end if;

Re: Raise Error Message [message #508594 is a reply to message #508592] Mon, 23 May 2011 05:49 Go to previous messageGo to next message
meim
Messages: 35
Registered: July 2009
Member
The problem is i can't made any change in form level ( no change at all). it is baseline form and we don't go for any customization.

so using on-error solution will not work with me.

changes i can do only on the custom trigger i implemented.


Thanks
Re: Raise Error Message [message #508603 is a reply to message #508594] Mon, 23 May 2011 07:09 Go to previous message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
Then you can't catch the error message.
Previous Topic: delete_record makes no changes
Next Topic: Unable to insert checbox checked records
Goto Forum:
  


Current Time: Sat Sep 07 15:39:52 CDT 2024