Solved

trigger firing sequence

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

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.

Question has a verified solution.

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

Suggested Solutions

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.

778 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