觸發器執行順序:
1. 當開啟FORM時:
(1) PRE-FORM
(2) PRE-BLOCK(BLOCK級)
(3) WHEN-NEW-FORM-INSTANCE
(4) WHEN-NEW-BLOCK-INSTANCE
(5) WHEN-NEW-RECORD-INSTANCE
(6) WHEN-NEW-ITEM-INSTANCE
2. 當填寫一行記錄完成後,游標移動到下一條記錄的時候:
(1) WHEN-VALIDATE-RECORD
(只將填寫的記錄與資料庫中已存在的記錄作唯一性的驗證,如果只是頁面上的資料重複而資料庫中沒有與其重複的值則不會報錯.)
(2) WHEN-NEW-RECORD-INSTANCE
(3) WHEN-NEW-ITEM-INSTANCE
3. 當點擊“儲存”時
(1) WHEN-VALIDATE-RECORD
(將頁面上的所有資料提交到資料庫,若頁面上有重複的資料,則提交第一次時成功但只是將資料先寫到資料庫中一類似暫存資料表的地方,在提交第二條重複記錄的時候報錯,執行交易回復,原來執行成功的指令也將被撤消)
(2) PRE-INSERT
(3) ON-INSERT
(4) POST-INSERT
(5) POST-FORMS-COMMIT
(6) PRE-BLOCK(BLOCK級)
(7) KEY-COMMIT
(8) WHEN-NEW-ITEM-INSTANCE
4. 當游標移動到當前資料區塊中已經顯示的行上時:
(1) WHEN-REMOVE-RECORD
(2) WHEN-NEW-RECORD-INSTANCE
(3) WHEN-NEW-ITEM-INSTANCE
當在該行上的不同ITEM移動時:
(4)WHEN-NEW-ITEM-INSTANCE
5. 當要進行修改時(在記錄中的某個項上進行了修改時):
(1)ON-LOCK
6. 在修改完成後進行儲存時:
(1) WHEN-VALIDATE-RECORD
(2) PRE-UPDATE
(3) ON-UPDATE
(4) POST-FORMS-COMMIT
(5) PRE-BLOCK(BLOCK級)
(6) KEY-COMMIT
(7) WHEN-NEW-ITEM-INSTANCE
7. 刪除一條記錄時:
(1) ON-LOCK
(2) WHEN-REMOVE-RECORD
(3) KEY-DELREC
(4) WHEN-NEW-RECORD-INSTANCE
(5) WHEN-NEW-ITEM-INSTANCE
8. F11查詢過程:
(1) WHEN-CLEAR-BLOCK
(2) WHEN-NEW-RECORD-INSTANCE
(3) WHEN-NEW-ITEM-INSTANCE
在輸入查詢條件後點CTRL+F11:
(4) PRE-QUERY
(5) WHEN-CLEAR-BLOCK
(6) POST-QUERY
(7) WHEN-NEW-RECORD-INSTANCE
(8) WHEN-NEW-ITEM-INSTANCE
9. CRRL+F11:
(1) WHEN-CLEAR-BLOCK
(2) PRE-QUERY
(3) WHEN-CLEAR-BLOCK
(4) POST-QUERY(每查一條記錄,觸發一次)
(5) WHEN-NEW-RECORD-INSTANCE
(6) WHEN-NEW-ITEM-INSTANCE
10.