Home » Developer & Programmer » Forms » oracle forms and database triggers problem
oracle forms and database triggers problem [message #178111] Mon, 19 June 2006 07:42 Go to next message
ashosheh
Messages: 25
Registered: June 2006
Location: JOR
Junior Member
hello
I created a (before insert or update [for each row]) database trigger on my table , the trigger works as follows: if checking condition in the trigger fails , I raise an application error with 20002 code and an error message, otherwise I insert or update records.
In SQL-PLUS everything works fine and the error message is printed when the trigger fails, but...
In form builder ... when i create an insert datablock on this table , if inserted values matches the database trigger condtion, everything works fine and rows are inserted/updated. but if those values does not match ,the form does not print the error message which i specified in the database trigger,it prints a (successful operation completion) message but no values were saved in the table.
i tried to use ON_ERROR trigger but also didn't work.
plz tell me if anybody has the solution.
Re: oracle forms and database triggers problem [message #178255 is a reply to message #178111] Tue, 20 June 2006 05:56 Go to previous messageGo to next message
ashosheh
Messages: 25
Registered: June 2006
Location: JOR
Junior Member
i solved it by using DBMS_ERROR_CODE & DBMS_ERROR_MESSAGE
Re: oracle forms and database triggers problem [message #178258 is a reply to message #178111] Tue, 20 June 2006 06:15 Go to previous message
RJ.Zijlstra
Messages: 104
Registered: December 2005
Location: Netherlands - IJmuiden
Senior Member
Hi,

Start up Forms.
Open the 'Help', goto tab 'Find', search for 'PRAGMA', select PRAGMA EXCEPTION_INIT.

All you need to know is there.

HTH,

Regards

Rob Zijlstra
Previous Topic: Current Item Highlghting
Next Topic: how get parameter wise view
Goto Forum:
  


Current Time: Fri Sep 20 09:36:55 CDT 2024