Solved

trigger firing sequence

Posted on 2004-08-07
4
760 Views
Last Modified: 2012-05-05
I have a form with a block named Employee whose base table is EMP.
I have defined pre-insert, post-insert, pre-delete, post-delete, pre-update, post-update triggers at form level
now i insert some rows , update some rows and then delete some rows and then hit the save button to save the information to the database. In which sequence does the above mentioned trigggers fire?
0
Comment
Question by:hiswapna
4 Comments
 
LVL 5

Accepted Solution

by:
gmyers earned 50 total points
ID: 11749120
They fire in the order of the affected records in the block, with deletes firing first.

Say you select records 1,2,3,4,5
You update record 1, delete records 2,3, insert a new record 2a between 1 and 3 and update record 4 and finally add a new record 6

It would first do the deletes for 2 and 3, then the update for 1, the insert for 2a, the update for 4 and finally the insert for 6.
Obviously, the 'pre' trigger fire before the 'post' triggers

0
 
LVL 14

Expert Comment

by:leoahmad
ID: 11749200
An easy way to find out the firing sequence by yr  own is write a text message like '...........trigger fire' in each of the trigger and then run the form. it will shows the messages at appropriate actions and so you can find the seq. order.

0
 
LVL 8

Expert Comment

by:annamalai77
ID: 11750240
hi

the method given by leoahmad is also one way. the other way is go to program-> tools->preferences->runtime-> check the dubug messages. when u press every key u can find out which trigger is firing first.

in case i have mentioned the option incorrectly, do bare with me since i dont have forms in my PC now.

regards
annamalai
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now