Difference between revisions of "FLOCK()"
Yvonnemilne (Talk | contribs) |
Helengeorge (Talk | contribs) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Function to lock file | Function to lock file | ||
Line 31: | Line 27: | ||
==Products== | ==Products== | ||
− | Recital | + | Recital Server, Recital |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
+ | [[Category:Manual Locking]] | ||
+ | [[Category:Manual Locking Functions]] |
Latest revision as of 15:56, 2 December 2009
Purpose
Function to lock file
Syntax
FLOCK([<workarea | alias>])
See Also
ACCESS(), LOCK(), LOCKF, LOCKR, RLOCK(), SET EXCLUSIVE, USE
Description
The FLOCK() function attempts to logically lock the currently selected table. If successful, it returns .T. and the table is locked. If the table is already locked by another user, it returns .F. If the optional <workarea | alias> name is specified the function will operate in the required location. The FLOCK() function does NOT change the open status of the table to 'exclusive'.
The Recital/4GL performs automatic record locking, which makes the use of the FLOCK() function unnecessary. The commands that require EXCLUSIVE use of the table are MODIFY STRUCTURE, REINDEX, PACK, INDEX ON <exp> TAG, and ZAP. For reasons of safety, the INDEX command should also be used only with exclusive use of the table.
Example
do while not flock() @23,0 say "Database in use. please wait." sleep 2 enddo
Products
Recital Server, Recital