A record must be locked to delete it or save any changes made to it. A lock is applied when a record is read from a table. Two types of locks can be used: passive and active.
A passive lock allows other users to access the record. Other users can delete the record or make changes to it. Passive locking ensures that other users accessing the record can be made aware that the record has been deleted or that the contents of the record have changed. A passive lock is applied each time a record is read using the change or edit table statement.
An active lock allows other users to read the record, but not make any changes or delete the record. Active locking ensures that the user who has the active lock is the only user who can make changes or delete the record. If other users try to delete or change the record, a table-sharing error will occur. An active lock is applied each time a record is read using the change or edit table statements with the lock keyword included.
The get statement is used only to read a record. It never locks a record.
You must mark the Allow Active Locking option in the table definition for each table on which active locking will be allowed. If you don’t mark this option, any change or edit table statements that reference that table and include the lock keyword will produce errors when you attempt to compile them.
We strongly recommend that you avoid using active locking in your application. Application performance can degrade when active locking is used, especially when your application uses a SQL database.