-->

Spiga

What is the difference between the following triggers

What is the difference between the following triggers :
- Post-Fetch vs. Post_Query
- Post-Forms-Commit vs. Post-Database-Commit
- Pre-Query vs. Pre-Select

Answer

A comparison of these triggers follows :
Post-Fetch vs. Post-Query
POST-FETCH fires just after each attempt to fetch records from the database. Depending on the value of "Array Size" for the block in question, and how many records are actually delivered from the database in response to our request, this trigger may fire fewer times.
In contrast, POST-QUERY fires once for *each* record that is brought from the waiting area (where records first go after they are fetched in a bunch from the database) and added to the end of the current block's list of records.

Post-Forms-Commit vs. Post-Database-Commit
POST-FORMS-COMMIT fires as the last trigger which is still part of the current transaction during commit-time processing. It is the last chance for the application to perform any processing or to rollback the transaction before the actual 'COMMIT' is issued.
The POST-DATABASE-COMMIT triggers fires just after the 'COMMIT' statement is issued by forms to close the current transaction. At this point it is too late to rollback the transaction.

Pre-Query vs. Pre-Select
PRE-QUERY fires just before Forms begins to prepare the SQL statement that will be required to query the appropriate records from the database in response to the query criteria that have been entered into the example record.
It is the designer's last chance to "deposit" query criteria into the items in the block as if they had been entered into the example record by the operator.
PRE-SELECT fires after the PRE-QUERY trigger, and just before the actual, physical construction of the SELECT statement begins. It would typically be used in conjunction with an ON-SELECT trigger in which the designer would be supplanting the normal construction of the SELECT statement with a user exit of his own to construct and prepare the SELECT statement for execution (perhaps against a foreign datasource).

There was an error in this gadget