On-Lock Trigger
Description
Fires whenever Oracle Forms would normally attempt to lock a row, such as when an operator presses a key to modify data in an item. The trigger fires between the keypress and the display of the modified data.
Definition Level form or block
Legal Commands
SELECT statements, unrestricted Built-ins
Enter Query Mode no
Usage Notes
- Use an On-Lock trigger to replace the default Oracle Forms processing
for locking rows. For example, for an application intended for use on a single-user
system, use the On-Lock trigger to speed processing by bypassing all lock
processing. Also, use On-Lock when accessing a non-ORACLE data source directly,
not by way of Open Gateway.
- When the On-Lock trigger fires as a result of an operator trying to modify
data, the trigger fires only the first time the operator tries to modify an
item in the record. The trigger does not fire during subsequent modifications
to items in the same record. In other words, for every row that is to be locked,
the trigger fires once.
- To perform the default Oracle Forms processing from this trigger, include
a call to the LOCK_RECORD Built-in.
- Use this trigger to lock underlying tables for non-updateable views.
Caution
In special circumstances, you may use the LOCK TABLE DML statement in an On-Lock trigger. However, as this could result in other users being locked out of the table, please exercise caution and refer to the ORACLE RDMS Database Administrator's Guide before using LOCK TABLE.
On Failure
When the On-Lock trigger fails, the target record is not locked and Oracle Forms attempts to put the input focus on the current item. If the current item cannot be entered for some reason, Oracle Forms attempts to put the input focus on the previous navigable item.
Fires In
Lock the Row
Related topic
LOCK_RECORD Built-in