Difference between revisions of "LOCK()"

From Recital Documentation Wiki
Jump to: navigation, search
(Class)
 
Line 1: Line 1:
 
 
 
==Purpose==
 
==Purpose==
 
Function to lock record
 
Function to lock record
Line 29: Line 27:
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital Server, Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:Manual Locking]]
 
[[Category:Manual Locking]]
 
[[Category:Manual Locking Functions]]
 
[[Category:Manual Locking Functions]]

Latest revision as of 17:07, 2 December 2009

Purpose

Function to lock record


Syntax

LOCK([<workarea | alias>])


See Also

FLOCK(), LOCKF, LOCKR, RLOCK(), UNLOCK


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..

Note: Recital automatically performs file and record locking so, in most situations, this function is unnecessary. It is included for compatibility with programs written with other products. If the optional <workarea | alias> is specified, then the function will operate in that <workarea | alias>.


Example

do while not lock()
    set message to "Record is in use."
    sleep 2
enddo


Products

Recital Server, Recital