Difference between revisions of "SET PCLOCKING"

From Recital Documentation Wiki
Jump to: navigation, search
(See Also)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=SET PCLOCKING=
 
 
 
==Class==
 
Xbase Compatibility
 
 
 
 
==Purpose==
 
==Purpose==
 
Determine whether multiple locks may be applied
 
Determine whether multiple locks may be applied
Line 15: Line 8:
  
 
==See Also==
 
==See Also==
[[APPEND]], [[CHANGE]], [[EDIT]], [[LOCKF]], [[LOCKR]], [[UNLOCK]], [[USE]], [[ACCESS()]], [[EDITFIELD()]], [[FILETYPE()]], [[FLOCK()]], [[INDEXEXT()]], [[LOCK()]], [[RLOCK()]], [[SET CLIPPER]], [[SET CLIPPER5]], [[SET COMPATIBLE]], [[SET EDITFIELD]], [[SET EXCLUSIVE]], [[SET FILECASE]], [[SET FILETYPE]], [[SET FORMAT]], [[SET INDEXEXT]], [[SET LOCKWAIT]], [[SET MEMOEXT]], [[SET PCEDIT]], [[SET PCEXACT]], [[SET PCFILTER]], [[SET PCGRAPHICS]], [[SET PCKEYS]], [[SET PCPICTURE]], [[SET PCSAYS]], [[SET PCUNIQUE]], [[DB_FOXPLUSBUGS]], [[DB_FOXPROKEYS]], [[DB_SAMBA]]
+
[[ACCESS()]], [[APPEND]], [[CHANGE]], [[DB_FOXPLUSBUGS]], [[DB_FOXPROKEYS]], [[DB_SAMBA]], [[EDIT]], [[EDITFIELD()]], [[FILETYPE()]], [[FLOCK()]], [[INDEXEXT()]], [[LOCK()]], [[LOCKF]], [[LOCKR]], [[RLOCK()]], [[SET CLIPPER]], [[SET CLIPPER5]], [[SET COMPATIBLE]], [[SET EDITFIELD]], [[SET EXCLUSIVE]], [[SET FILECASE]], [[SET FILETYPE]], [[SET FORMAT]], [[SET INDEXEXT]], [[SET LOCKWAIT]], [[SET MEMOEXT]], [[SET PCEDIT]], [[SET PCEXACT]], [[SET PCFILTER]], [[SET PCGRAPHICS]], [[SET PCKEYS]], [[SET PCPICTURE]], [[SET PCSAYS]], [[SET PCUNIQUE]], [[UNLOCK]], [[USE]]
 +
 
  
 
==Description==
 
==Description==
Line 24: Line 18:
  
 
==Example==
 
==Example==
<pre>
+
<code lang="recital">
 
set pclocking on
 
set pclocking on
 
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</pre>
+
enddo
 +
</code>
  
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital Server, Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 
[[Category:Set_Commands|PCLOCKING]]
 
[[Category:Set_Commands|PCLOCKING]]

Latest revision as of 16:59, 23 November 2009

Purpose

Determine whether multiple locks may be applied


Syntax

SET PCLOCKING ON | OFF | (<expL>)


See Also

ACCESS(), APPEND, CHANGE, DB_FOXPLUSBUGS, DB_FOXPROKEYS, DB_SAMBA, EDIT, EDITFIELD(), FILETYPE(), FLOCK(), INDEXEXT(), LOCK(), LOCKF, LOCKR, RLOCK(), SET CLIPPER, SET CLIPPER5, SET COMPATIBLE, SET EDITFIELD, SET EXCLUSIVE, SET FILECASE, SET FILETYPE, SET FORMAT, SET INDEXEXT, SET LOCKWAIT, SET MEMOEXT, SET PCEDIT, SET PCEXACT, SET PCFILTER, SET PCGRAPHICS, SET PCKEYS, SET PCPICTURE, SET PCSAYS, SET PCUNIQUE, UNLOCK, USE


Description

The SET PCLOCKING command determines whether multiple locks may be applied to records or the currently active table. If PCLOCKING is set ON, previous locks will be canceled as FLOCK() or RLOCK() functions attempt to lock records or files that are all ready locked. The previous lock will be removed regardless of the success or failure of the FLOCK() or RLOCK() function. When PCLOCKING is set OFF, multiple applications of the FLOCK() and RLOCK() functions are allowed. Please note that file and record locking is performed automatically. In most situations, the SET PCLOCKING command and the RLOCK() and FLOCK() functions are unnecessary, and are included for compatibility with programs written in other products.

This command allows the optional logical expression <expL> to be evaluated. If a value of .T. is returned, PCLOCKING is set ON. If a value of .F. is returned PCLOCKING is set OFF. Note that the <expL> should be enclosed in round brackets. By default, PCLOCKING is OFF.


Example

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


Products

Recital Server, Recital