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_setfileord() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 AX_SetFileOrd()
 Set an active index file to the controlling index
------------------------------------------------------------------------------

 Syntax

     AX_SetFileOrd( [<nFileOrder>] ) -> logical

     <nFileOrder> A numeric value that specifies which active index file is
     to be the controlling index.

 Returns

     Returns a logical .T. if the operation was successful, else returns .F.
     If an error occurred, AX_Error() will return information on why the
     function failed.

 Description

     AX_SetFileOrd() sets the specified active index FILE as the
     controlling index.  If no order is specified, the order is set to
     zero.  This causes the work area to be accessed in natural, record
     number order.

 Example

     // Assume TEST.DBF has a TEST.CDX with three tags (AGE, LAST, and
     // STATE).  Also, assume CITY.IDX and TEMP.IDX exist as well.

     USE test VIA "DBFCDXAX"            // Open TEST.DBF and TEST.CDX
     SET INDEX TO test, city, temp      // Put indexes in order we want

     // Current TAGORDER is:
     //  1 - AGE
     //  2 - LAST
     //  3 - STATE
     //  4 - CITY
     //  5 - TEMP

     // Current Index (FILE) Order is:
     //  1 - TEST.CDX
     //  2 - CITY.IDX
     //  3 - TEMP.IDX

     dbSetOrder( 3 )

     // Selects the third "tag" in the TAG ORDER (in this case, the
     // STATE tag within the TEST.CDX file).

     // Set the third index FILE (TEMP.IDX)
     AX_SetFileOrd( 3 )


See Also: AX_FileOrder() AX_SetTagOrder() AX_TagOrder()

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