Solved

trigger firing sequence

Posted on 2004-08-07
4
759 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video shows how to recover a database from a user managed backup

763 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

9 Experts available now in Live!

Get 1:1 Help Now