community.borland.com

Article #25844: How can I lock a record in InterBase?

Problem:
How can I lock a record in InterBase?

Solution:
The information in this article applies to:
** All InterBase versions

Doing one of the SQL commands  UPDATE, DELETE or INSERT will lock the
records at the time these operations are done on the records.  This is called
optimistic locking.  If you want to "pre-lock" a record before doing these
operations on a set of records, this would be called pessimistic locking.  To
do this try doing a statement like

UPDATE 
SET  = 
WHERE  = ;

Next perform the UPDATE, or the DELETE.  To release the lock on the table do a
COMMIT or ROLLBACK.

(Thanks to Paul Powers)

Last Modified: 20-OCT-00