Returns the collation sequence for an index or index tag.
Syntax
IDXCOLLATE([cCDXFileName,] nIndexNumber [, nWorkArea | cTableAlias])
Returns
Character
Arguments
cCDXFileName
Specifies the name of the compound index file. The compound index file you specify can be the structural compound index file automatically opened with the table or an independent compound index file.
nIndexNumber
Specifies the index or index tag for which IDXCOLLATE( ) returns the collation sequence. IDXCOLLATE( ) returns the collation sequence for indexes and index tags in the following order as nIndexNumber increases from 1 to the total number of open index files and index tags:
The empty string is returned if nIndexNumber is greater than the total number of open single-entry .idx files and structural compound and independent compound index tags.
nWorkArea
Specifies the work area of the table for which IDXCOLLATE( ) returns index file and index tag collation sequences.
IDXCOLLATE( ) returns the empty string if a table isn't open in the work area you specify.
cTableAlias
Specifies the alias of the table for which IDXCOLLATE( ) returns index file and index tag collation sequences.
Visual FoxPro generates an error message if you specify a table alias that doesn't exist.
Remarks
IDXCOLLATE( ) can be used to return the collation sequence for each tag in multiple-entry compound index files, allowing you to completely delete an index file and rebuild it correctly, using a series of SET COLLATE and INDEX commands.
Note that IDXCOLLATE( ) isn't required for the proper functioning of REINDEX, because the collation sequence information is present in existing indexes and index tags.
For additional information about Visual FoxPro's international support, see Chapter 18, Developing International Applications, in the Programmer's Guide.