IDXCOLLATE( ) Function

Returns the collating sequence for an index or index tag.

IDXCOLLATE([cCDXFileName,] nIndexNumber [, nWorkArea | cTableAlias])

Parameters

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 collating sequence. IDXCOLLATE( ) returns the collating 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:

  1. Collating sequences for single-entry .idx index files (if any are open) are returned first. The order in which the single-entry index files are included in USE or SET INDEX determines how the collating sequences are returned.

  2. Collation sequences for tags in the structural compound index (if one is present) are returned next. The collating sequences are returned for the tags in the order in which the tags are created in the structural compound index.

  3. Collating sequences for tags in any open independent compound indexes are returned last. The collation sequences are returned for the tags in the order in which the tags are created in the independent compound indexes.

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 collating 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.

Expand imageReturn Value

Expand imageRemarks

Expand imageExample

Expand imageSee Also


© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic