# FLOCK()

Locks a file

Syntax

  FLOCK() --> lSuccess

Returns

  <lSuccess> A true (.T.) value, if the lock was successful;otherwise false (.F.)

Description

  This function returns a logical true (.T.0 if a file lock is attempted and is successfully placed on the current or designated database.This function will also unlock all records locks placed by the same network station.

Examples

          USE Tests New
          IF FLOCK()
             SUM Tests->Ammount
          ENDIF
          USE

Status

  Ready

Compliance

  This function is CA-Clipper compatible

Files

  Library is rdd

See Also

- RLOCK()