Difference between revisions of "RLOCK()"

From Recital Documentation Wiki
Jump to: navigation, search
 
Line 1: Line 1:
=RLOCK()=
 
 
 
 
==Class==
 
==Class==
 
Manual Locking
 
Manual Locking
Line 15: Line 12:
  
 
==See Also==
 
==See Also==
[[LOCK()]], [[FLOCK()]], [[UNLOCK]], [[LOCKR]], [[LOCKF]]
+
[[FLOCK()]], [[LOCK()]], [[LOCKF]], [[LOCKR]], [[UNLOCK]]
  
  
Line 25: Line 22:
 
<code lang="recital">
 
<code lang="recital">
 
do while not rlock()
 
do while not rlock()
set message to "Record in use."
+
    set message to "Record in use."
sleep 2
+
    sleep 2
 
enddo
 
enddo
 
</code>
 
</code>
Line 35: Line 32:
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
[[Category:Manual Locking]]
 +
[[Category:Manual Locking Functions]]

Revision as of 08:50, 2 June 2009

Class

Manual Locking


Purpose

Function to lock record


Syntax

RLOCK([<workarea | alias>])


See Also

FLOCK(), LOCK(), LOCKF, LOCKR, 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.. 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.


Example

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


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer