HELP IN "ON_ERROR " TRIGGER [message #343094] |
Tue, 26 August 2008 04:51 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
EL-SAYED
Messages: 17 Registered: July 2008
|
Junior Member |
|
|
DEAR ALL:
if error_code=40508
then
message('CAN NOT DUPLICATE THIS VALUE');
message('CAN NOT DUPLICATE THIS VALUE');
else
raise form_trigger_failure ;
end if ;
I USED THIS CODE IN TRIGGER "ON_ERROR " TO DISLAY MESSAGE TO USER WHEN HE DUPLICATE THE PK COLUMN.
THE PROBLEM IS :IT ALSO WORK WHEN THE USER ENTER VALUE IN FK COLUMN NOT FOUND AS PK IN ITS TABLE.
THANKS FOR HELP
|
|
|
|
|
|
Re: HELP IN "ON_ERROR " TRIGGER [message #344636 is a reply to message #344626] |
Sun, 31 August 2008 05:13 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
El-Sayed,
the main problem here is the fact that you have posted this message in the "Test" forum. Its description says:Test forum description | Use this forum to post practice/experimental messages before posting to the other forums.
|
Michel said that your "test" message failed because you chose to use upper case which should be avoided, according to netiquette:Quote: | avoid typing in ALL CAPS, which is considered shouting or yelling
|
You, on the other hand, failed to get the point.
Now, if your question has nothing to do with your real problem, it will remain here, in the "Test" forum. Otherwise, if you really need the answer (a hint: as validating different items raises this error, see if use of :SYSTEM.TRIGGER_ITEM system variable might help - include it into the IF construct), you should consider posting questions in the most appropriate forum (for this problem, it is the "Forms" forum). If you wish, moderators can move it over there.
Finally, if you still didn't do it, you might want to read the OraFAQ Forum Guide to get familiar with certain rules valid on the OraFAQ Forum.
|
|
|
|
|
|