Difference between revisions of "UNLOCK"

From Recital Documentation Wiki
Jump to: navigation, search
 
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=UNLOCK=
 
 
 
==Class==
 
Manual Locking
 
 
 
 
==Purpose==
 
==Purpose==
 
Release active table and record locks
 
Release active table and record locks
Line 15: Line 8:
  
 
==See Also==
 
==See Also==
[[LOCKF]], [[LOCKR]], [[RLOCK()]], [[FLOCK()]]
+
[[FLOCK()]], [[LOCKF]], [[LOCKR]], [[RLOCK()]]
  
  
Line 37: Line 30:
 
// Lock record with dBASE III compatibility
 
// Lock record with dBASE III compatibility
 
do while not rlock()
 
do while not rlock()
sleep 2
+
    sleep 2
 
enddo
 
enddo
 
// NOTE Recital automatically locks the  
 
// NOTE Recital automatically locks the  
Line 48: Line 41:
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital Server, Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 +
[[Category:Manual Locking]]
 +
[[Category:Manual Locking Commands]]

Latest revision as of 16:28, 25 November 2009

Purpose

Release active table and record locks


Syntax

UNLOCK [ALL] [IN <alias>]


See Also

FLOCK(), LOCKF, LOCKR, RLOCK()


Description

The UNLOCK command releases any active file or record locks for the currently selected workarea. This command is only effective with shared tables.

ALL

If the optional ALL keyword is specified, then the active file and record locks are released for all workareas.

IN <alias>

The IN <alias> clause is used to release file or record locks in another workarea. Alias names may be assigned to tables with the USE command.

The UNLOCK command works in conjunction with the RLOCK() and FLOCK() functions, and the LOCKR and LOCKF commands. This command is supported to provide compatibility with Xbase, but is normally not needed as the Recital/4GL performs automatic file and record locking.


Example

set exclusive off
use patrons index events, dates, names
seek "PHANTOM"
// Lock record with dBASE III compatibility
do while not rlock()
    sleep 2
enddo
// NOTE Recital automatically locks the 
// record in the EDIT command.  The RLOCK()
// and UNLOCK are not really necessary.
edit
unlock


Products

Recital Server, Recital