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 - set axs locking http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SET AXS LOCKING
 Set the Advantage locking mode
------------------------------------------------------------------------------

 Syntax

     SET AXS LOCKING ON | off

     Locking ON prevents non-Advantage applications writable access
     to any tables and index files currently open with Advantage.  All file
     and record locks are managed by Advantage.  AXS LOCKING ON is the
     default.

     Locking OFF allows non-Advantage applications, such as Clipper
     Summer '87 and FoxPro, to access tables and index files in a writable
     mode that are already opened by Advantage applications.  All file
     and record locks are ultimately sent to the network operating system
     for shared access.

 Description:

     SET AXS LOCKING ON will turn cause Advantage Proprietary Locking
     to be used.  SET AXS LOCKING OFF will cause Advantage Compatibility
     Locking to be used.

     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 (SET 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
     SET AXS LOCKING OFF is used, 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 SET AXS LOCKING ON, 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 (SET AXS LOCKING OFF) only when first converting
     applications to Advantage.  Once the applications are converted,
     use Advantage Proprietary Locking (SET AXS LOCKING ON) for best
     performance and stability.

     When using Advantage Compatibility Locking (SET 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

     #include "DBFNTXAX.CH"

     // Turn AXS locking OFF so this table can be shared in a writable
     // mode with the DBFNTX RDD
     SET AXS LOCKING OFF

     USE test VIA "DBFNTXAX" SHARED NEW

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


See Also: AX_AXSLocking()

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