Difference between revisions of "LOCK()"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (1 revision) |
Yvonne.milne (Talk | contribs) |
||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to lock record | Function to lock record | ||
− | |||
==Syntax== | ==Syntax== | ||
LOCK([<workarea | alias>]) | LOCK([<workarea | alias>]) | ||
− | |||
==See Also== | ==See Also== | ||
− | [[FLOCK() | + | [[FLOCK()]], [[RLOCK()]], [[UNLOCK]] |
− | + | ||
==Description== | ==Description== | ||
The LOCK() function attempts to lock the current record. If successful, it returns .T. and the record is locked. If the record is already locked by another user then it returns .F.. | The LOCK() function attempts to lock the current record. If successful, it returns .T. and the record is locked. If the record is already locked by another user then it returns .F.. | ||
− | |||
− | |||
− | |||
==Example== | ==Example== | ||
<code lang="recital"> | <code lang="recital"> | ||
do while not lock() | do while not lock() | ||
− | |||
sleep 2 | sleep 2 | ||
enddo | enddo | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
[[Category:Manual Locking]] | [[Category:Manual Locking]] | ||
[[Category:Manual Locking Functions]] | [[Category:Manual Locking Functions]] |
Revision as of 07:39, 10 February 2012
Contents
Purpose
Function to lock record
Syntax
LOCK([<workarea | alias>])
See Also
Description
The LOCK() function attempts to lock the current record. If successful, it returns .T. and the record is locked. If the record is already locked by another user then it returns .F..
Example
do while not lock() sleep 2 enddo