ID: Q92357
2.00 2.50 2.50a | 2.50 2.50a 3.00
MS-DOS | WINDOWS
kbprg
The information in this article applies to:
Microsoft FoxPro supports two types of .cdx compound index files: structural and independent (nonstructural). An independent compound index file is created by specifying an OF clause in the INDEX command.
Unlike the structural index file, an independent index file is not opened when the associated database is opened. To open the index, use the SET INDEX command or the INDEX clause of a USE command.
The information below demonstrates how to create, open, and specify the order of an independent .cdx file with multiple tags.
To create an independent index for a database, use commands such as the following. Note that the name of the .cdx file cannot be the same as the name of the database.
USE OFFICES
INDEX ON ONO TAG ONO OF Xoffices.cdx
INDEX ON CITY TAG CITY OF Xoffices.cdx
INDEX ON STATE TAG STATE OF Xoffices.cdx
To open a database with an associated independent .cdx file, use code
such as the following:
USE OFFICES INDEX Xoffices.cdx
* Set the order and list to demonstrate each tag is correct.
SET ORDER TO TAG ONO OF Xoffices.cdx
LIST
SET ORDER TO TAG CITY OF Xoffices.cdx
LIST
SET ORDER TO TAG STATE Of Xoffices.cdx
LIST
Additional reference words: VFoxWin 3.00 FoxDos FoxWin 2.00 idx index
structural
compound 2.50
2.50a
KBCategory: kbprg
KBSubcategory: FxprgGeneral
Keywords : FxprgGeneral
Version : 2.00 2.50 2.50a | 2.50 2.50a 3.0
Platform : MS-DOS WINDOWS
Last Reviewed: February 21, 1998