Returns the name of an open index (.IDX) file for the current or specified table.

NDX(nIndexNumber [, nWorkArea | cTableAlias])

Parameters

nIndexNumber

Specifies which .idx file name to return. USE and SET INDEX both support an index file list that makes it possible for you to open .idx files for a table. The order of the file names in this index file list determines which .idx file name NDX( ) returns. For example, if nIndexNumber is 1, NDX( ) returns the name of the first .idx file in the index file list; if nIndexNumber is 2, NDX( ) returns the second .idx file name, and so on. NDX( ) ignores names of compound index (.cdx) files in the index file list.

NDX( ) returns an empty string if nIndexNumber is greater than the number of .idx files in the index file list.

nWorkArea

Specifies the work area number for .IDX files open in a work area other than the current one. NDX( ) returns an empty string if no table is open in the work area you specify. If you omit nWorkArea, NDX( ) returns the names of .idx files open with the table in the current work area.

cTableAlias

Specifies the table alias for .idx files open in a work area other than the current one. If no table has the alias you include, Visual FoxPro generates an error message. If you omit cTableAlias, NDX( ) returns the names of .idx files open with the table in the current work area.

Expand imageReturn Value

Expand imageRemarks

Expand imageSee Also