Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Advantage CA-Clipper Guide v5.5 - ax_axslocking() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 AX_AXSLocking()
 Returns and sets the Advantage locking mode
------------------------------------------------------------------------------

 Syntax

     AX_AXSLocking( [.T.|.F.] ) -> logical

     [.T.|.F.]  A logical value used to turn AXS Locking ON (.T.)
     which means use Advantage Proprietary Locking mode, or OFF (.F.)
     which means use Advantage Compatibility Locking mode.

 Returns

     If no parameter is passed to AX_AXSLocking(), then returns the current
     Advantage locking mode setting, i.e., .T. if AXS locking is ON or .F.
     if AXS Locking is turned OFF.  If a parameter is passed to
     AX_AXSLocking(), returns previous Advantage locking mode setting.

 Description

     AX_AXSLocking() will turn cause Advantage Proprietary Locking to be
     used if the logical value .T. is passed, or use Advantage
     Compatibility Locking if the logical value .F. is passed.  If no
     value is passed, the current Advantage locking mode setting is
     returned, and the Advantage locking mode remains the same.

     Once the Advantage locking mode is changed, it applies to all
     subsequent work areas opened in the application. A change in the
     setting does NOT affect tables that are already open.

     By default, locking is managed internally by the Advantage Database
     Server using proprietary locking schemes.  This requires any
     other applications using the shared files in a writable mode to be
     Advantage applications.  If non-Advantage applications only need
     read access to a table, that table can be opened by the Advantage
     application using Advantage Proprietary Locking (AXS Locking On)
     and the table can still be opened by the non-Advantage application
     in a read-only mode.

     There are cases when applications cannot use Advantage, such as "C",
     FoxPro, and Clipper Summer '87 applications.  To allow Advantage and
     non-Advantage applications to share files in a writable mode
     simultaneously, Advantage Compatibility locking can be used.  When
     AXS Locking is OFF, lock management will ultimately go through the
     network operating system.  This allows multiple Advantage and non-
     Advantage applications to access the same files in a writable mode
     concurrently.

     With AXS Locking OFF, the locking is not managed by Advantage.
     This can cause slight performance decreases, and files are more
     susceptible to corruption because non-Advantage applications can
     still write the database. We recommend using Advantage
     Compatibility Locking (AXS Locking Off) only when first converting
     applications to Advantage.  Once the applications are converted,
     use Advantage Proprietary Locking (AXS Locking On) for best
     performance and stability.

     When using Advantage Compatibility Locking (AXS Locking Off) with
     the Advantage DBFCDXAX RDD, Advantage uses FoxPro standard locking
     offsets.

     Note:  If using Advantage Compatibility Locking and sharing
     data in a writable mode with the COMIX RDD, you must link the
     CMXFOX52.OBJ into your COMIX application to force COMIX to use
     FoxPro standard locking offsets so that the DBFCDXAX and COMIX
     will obey each other's locks.  For some strange reason, the COMIX
     RDD does not use FoxPro compatible locking by default.

     Note:  If using Advantage Compatibility Locking and sharing data
     in a writable mode with the CA-Clipper 5.3 DBFCDX RDD, you must
     link the CDXLOCK.OBJ into your DBFCDX application to force DBFCDX
     to use FoxPro standard locking offsets so that the DBFCDXAX and
     DBFCDX will obey each other's locks.  For some strange reason,
     the CA-Clipper 5.3 DBFCDX RDD does not use FoxPro compatible
     locking by default.

 Example

     ? "AXS locking is currently," AX_AXSLocking()

     // Turn AXS locking OFF so this table can be shared in a writable
     // mode with the DBFNTX RDD
     AX_AXSLocking( .F. )

     USE test VIA "DBFNTXAX" SHARED NEW

     // This lock will be seen by Clipper and will respect Clipper's locks
     ? RLock()


See Also: SET AXS LOCKING

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson