Re: trigger,rollback,stored procedure
Posted in 1996
Frederic Rivalland (frivalla@soleil.univ-lr.fr) wrote: : hi : how can i insert data in a table (to retirve some details about the error) : ,in a pl/sql stored procedure , after a raise exception (the insertion is : just after the raise exception) when this stored procedure is fired by a : triggers. : My problem is when i fired a procedure by a trigger: : i've got the error -744. : If i do an execute procedure without trigger : : i've got no problems !!!! First, keep in mind that a triggered action cannot modify the object of a triggering event. This is probably why you get a -744 when executing the procedure from a trigger. You don't include the syntax of your trigger and procedure, so I can't say for certain this is what you are doing. What I suggest is that you structure your procedures so that the RAISE EXCEPTION will be trapped by a higher level ON EXCPETION. Then in the ON EXCEPTION clause, insert a row into an error table. I usually write a canned SP to do this, which I call from the ON EXCEPTION clause. The error table contains a serial column whose inserted value is then returned to the calling procedure so it can be used to retrieve whatever information you inserted into the table. ___ ___ Principal Consultant / ) __ . __/ /_ ) _ _ __ Informix Software Inc. (303) 850-0210 _/__/ (_(_ (/ / (_(_ _/__) (-' ~/ '(_- 5299 DTC Blvd #740 Englewood CO 80111 dberg@informix.com Opinions expressed herein are my own. Eventually all things merge into one...and a river runs through it. -N.Maclean