Difference between revisions of "RLOCK()"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to lock record
 
Function to lock record
 
  
 
==Syntax==
 
==Syntax==
 
RLOCK([<workarea | alias>])
 
RLOCK([<workarea | alias>])
 
  
 
==See Also==
 
==See Also==
[[FLOCK()]], [[LOCK()]], [[LOCKF]], [[LOCKR]], [[UNLOCK]]
+
[[FLOCK()]], [[LOCK()]], [[UNLOCK]]
 
+
  
 
==Description==
 
==Description==
The RLOCK() 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..  Please note that 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 the required location.
+
The RLOCK() 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..  If the optional <workarea | alias> is specified, then the function will operate in the required location.
 
+
  
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
 
do while not rlock()
 
do while not rlock()
    set message to "Record in use."
 
 
     sleep 2
 
     sleep 2
 
enddo
 
enddo
 
</code>
 
</code>
  
 
==Products==
 
Recital, Recital Server
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:Manual Locking]]
+
[[Category:Cursor Functions]]
[[Category:Manual Locking Functions]]
+

Latest revision as of 07:47, 4 February 2013

Purpose

Function to lock record

Syntax

RLOCK([<workarea | alias>])

See Also

FLOCK(), LOCK(), UNLOCK

Description

The RLOCK() 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.. If the optional <workarea | alias> is specified, then the function will operate in the required location.

Example

do while not rlock()
    sleep 2
enddo