Solved

trigger firing sequence

Posted on 2004-08-07
4
764 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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
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…
Via a live example, show how to take different types of Oracle backups using RMAN.

821 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