how to avoid mutating table error [message #397281] |
Thu, 09 April 2009 14:56 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
nastyjillu
Messages: 211 Registered: February 2009
|
Senior Member |
|
|
hi,
i have a table 'A'.
i have a on-insert trigger at row level on table 'A'.
in the trigger there is a cursor which queries the same table 'A'.
because of this iam getting mutating table error.
is there any way to avoid this error without having to change the code in the trigger?
i know that i using PRAGMA AUTONOMOUS_TRANSACTION is one way to avoid the error. but my leader doesnt want me to use it.
is there any other way??
can using pragma autonomous_transaction be harmfull in anyway??
iam inserting through forms application and unable to insert.
then i inserted using insert command in database and found the error.
thanks
jillu
|
|
|
|
|
|
Re: how to avoid mutating table error [message #398370 is a reply to message #397281] |
Thu, 16 April 2009 02:13 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/67467.jpg) |
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
The 'on-' triggers are typically used for non-Oracle databases. Consider using the 'pre-' or maybe 'post-' triggers. Also consider whether the work should be done at the database instead of the form level.
David
|
|
|