Difference between revisions of "SET PCLOCKING"

From Recital Documentation Wiki
Jump to: navigation, search
(Example)
Line 1: Line 1:
=SET PCLOCKING=
 
 
 
 
==Class==
 
==Class==
 
Xbase Compatibility
 
Xbase Compatibility
Line 15: Line 12:
  
 
==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 27: Line 25:
 
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</code>
+
enddo
 +
</code>
 +
 
  
 
==Products==
 
==Products==

Revision as of 09:46, 17 April 2009

Class

Xbase Compatibility


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 Database Server, Recital Mirage Server, Recital Terminal Developer