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 v6.11 - ax_autoopen() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 AX_AutoOpen()
 Allows the user to "turn off" the automatic opening of structural indexes
------------------------------------------------------------------------------

 Syntax

     AX_AutoOpen( [<lAutoOpen>] ) -> logical

     <lAutoOpen>  An optional logical value indicating the Auto Open mode
     to be used for structural .CDX files. Passing in a .T. will cause
     the structural.CDX file to be automatically opened when the
     associated table is opened. Passing in a .F. will cause
     structural .CDX files to not be opened automatically.

 Returns

     If no parameter is passed to AX_AutoOpen(), then it returns the
     current Auto Open mode (i.e. .T. for structural .CDX files to be
     automatically opened or .F. for structural .CDX files to not be
     automatically opened). If a parameter is passed to AX_AutoOpen(),
     then it returns the previous Auto Open mode.

 Description

     AX_AutoOpen() provides control over the automatic opening feature
     of structural .CDX indexes. By default, if TEST.DBF is opened with
     the Advantage CDX RDD, DBFCDXAX, the associated TEST.CDX structural
     index will be automatically opened, if it exists. Passing a .F. value
     into the AX_AutoOpen() function will "turn off" the automatic opening
     of structural .CDX files. Therefore, the TEST.CDX file will not be
     automatically opened when TEST.DBF is opened.

     AX_AutoOpen() provides you control over whether the structural
     index can be closed before the associated table is closed.
     If the AX_AutoOpen() mode is .T., then the structural .CDX will be
     automatically opened and it can NOT be closed until the associated
     table is closed. If the AX_AutoOpen() mode is .F., then
     the structural .CDX will NOT be automatically opened, but once it
     is manually opened, it can be closed at any time.

     Note: A change in the Auto Open mode does not affect the Advantage
     CDX compatibility locking strategy.  The Advantage DBFCDXAX RDD, the
     Loadstone COMIX RDD, and the CA-Clipper 5.3 DBFCDX RDD all use the
     same locking strategy with the Auto Open feature enabled or with
     the Auto Open feature disabled. The SuccessWare SIXCDX RDD,
     however, may use a different locking strategy than the DBFCDXAX,
     COMIX, and DBFCDX RDDs with or without the Auto Open feature
     enabled.

     This function does not apply to the Advantage NTX RDD, DBFNTXAX,
     because the NTX RDD does not use structural indexes.

 Examples

     ? AX_AutoOpen()          // Returns .T. (Default)

     USE test VIA "DBFCDXAX"  // Also opens TEST.CDX, if it exists

     // Disable the Auto Open feature
     ? AX_AutoOpen( .F. )     // Returns .T. (the previous setting)

     USE test2 VIA "DBFCDXAX" // Will NOT open TEST2.CDX


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