SET MULTILOCKS Command

Determines whether you can lock multiple records using LOCK( ) or RLOCK( ).

SET MULTILOCKS ON | OFF

Parameters

  • ON
    Allows you to attempt locking a set of records. Include a set of record numbers in LOCK( ) or RLOCK( ) to try to lock multiple records.
  • OFF
    (Default) Allows you to attempt locking a single record with LOCK( ) or RLOCK( ).

Remarks

When a table is opened for shared use on a network, you can attempt to lock more than one record in a table file. The SET MULTILOCKS setting determines whether you can attempt to lock either a single record or a set of records. Records can be locked with the LOCK( ) or RLOCK( ) function.

Note   Switching SET MULTILOCKS from ON to OFF or from OFF to ON implicitly issues UNLOCK ALL — all record locks in all work areas are released.

SET MULTILOCKS is scoped to the current data session.

MULTILOCKS must be ON to before row or table buffering can be enabled with CURSORSETPROP( ). See CURSORSETPROP( ) for additional information about row and table buffering.

If you select the Enable Data Buffering check box in the Work Area Properties dialog box (which is displayed when you choose the Properties button in the Data Session window), MULTILOCKS is automatically set to ON for the current data session. However, clearing the Enable Data Buffering check box does not set MULTILOCKS to OFF for the current data session.

For more information about record and file locking and sharing tables on a network, see the LOCK( ) and RLOCK( ) functions, and Programming for Shared Access.

See Also

CURSORSETPROP( ) | LOCK( ) | RLOCK( ) | SET DATASESSION