?
Solved

trigger firing sequence

Posted on 2004-08-07
4
Medium Priority
?
775 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 5

Accepted Solution

by:
gmyers earned 100 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

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

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
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.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
Suggested Courses

764 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