The SET LOCK command sets locks on tables. SET Lock should be set on when a user wants to be certain that no other user will alter data in the tables being updated during a procedure. This command is useful in conjunction with the DECLARE CURSOR command. If R:BASE cannot lock all tables listed in the command, it does not lock any of the tables listed in the command.

Exclusive table locks are cumulative--that is, for each SET LOCK tblname on command you issue, you must issue a corresponding SET LOCK tblname off command to remove the lock from that table. Also, the user who locked the table must issue the SET LOCK tblname off command.

The SET LOCK command is typically used in an application program to set locks, allow a procedure to be performed, then remove locks.

Automatic locking is in effect even if the SET LOCK command is issued. Setting locks off affects only locks set by the SET LOCK tblname ON command--not locks that R:BASE sets automatically.

Locks Topics
Using the SET ROWLOCKS Command to Lock Rows  
Using the SET VERIFY Command to Verify Data Entry  
Displaying Multi-User Locks  
Clearing Buffers with the SET CLEAR Command  
Other Multi-User Considerations  

Multi-User Mode Topics
Introduction to Using R:BASE on a Network  
Setting Up for Network Use  
Sharing Network Resources  
Setting the Multi-User Default  
Concurrency Control  
Resource Waiting  
Schema Reading Mode with SET STATICDB  
Locks