Recall that database triggers fire in response to a DML statement such as INSERT, UPDATE, or DELETE. So during normal Oracle Forms commit-time processing, as Oracle Forms issues INSERT statements to add newly entered records to the database, UPDATE statements to effect changes by the operator to existing records, and DELETE statements to remove records deleted by the operator from the database; database triggers will fire if enabled.
For example, consider the scenario where the following database triggers have been defined and enabled on the EMP table:
When the operator deletes a record that has been queried, the following sequence of events occurs:
Recall that any error raised during Commit processing causes Oracle Forms to roll back the currently committing transaction to the savepoint that was issued when the Commit sequence began. If any Database trigger fails (by raising an unhandled error or calling a RAISE_APPLICATION_ERROR) as a result of a DML statement that Oracle Forms has issued automatically, then an "Oracle Error Occurred ..." message will appear. An error raised as a result of a DML statement in your PL/SQL trigger, on the other hand, can be handled gracefully. If not handled, the error will produce the message: "XXX-YYYYYY trigger raised unhandled exception."