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_cdxcheck() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 AX_CDXCheck()
 Enable or disable "cannot open structural index" error
------------------------------------------------------------------------------

 Syntax

     AX_CDXCheck( [<lStrict>] ) -> logical

     <lStrict>  Optional logical value. A true value (.T.) enables
     strict structural .cdx checking. A false value (.F.) disables
     the strict checking.

 Returns

     Returns the previous setting. If no parameter is passed, the
     current state is returned.

 Description

     This function allows you to enable or disable the "cannot open
     structural index" error. If a table has a structural
     .cdx file, a byte (0 or 1) in the header of the table indicates
     its presence. If the structural .cdx file is deleted, the
     Advantage RDD (unlike FoxPro) will not generate an error when
     the table is reopened. Instead, it resets the byte in the
     table header to the "no .cdx" (zero) state, and continues with
     the open operation.

     If you would prefer an error to be generated if a structural
     .cdx file is missing when a USE command is issued, call
     AX_CDXCheck(.T.). This will cause a DBFCDXAX error to be
     generated when the table is opened.

 Example

     USE test VIA "DBFCDXAX"     // Open TEST.DBF, TEST.CDX
     INDEX ON age TAG age        // Create AGE tag in TEST.CDX
     CLOSE                       // Close all files

     ERASE test.cdx              // Delete TEST.CDX

     // Open TEST.DBF. By default, no error is generated and the byte
     // in the header is reset to 0.
     USE test VIA "DBFCDXAX"

     // Now recreate the TEST.CDX file and set CDX checking on
     INDEX ON state TAG state
     CLOSE

     // Turn structural CDX checking on
     AX_CDXCheck(.T.)

     ERASE test.cdx              // Delete TEST.CDX

     // Open TEST.DBF. This will generate a DBFCDXAX error.
     USE test VIA "DBFCDXAX"


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