JavaScript Editor js editor     Web development 



Main Page

Returns the name of the open .cdx compound index file that has the specified index position number.

MDX(nIndexNumber [, nWorkArea | cTableAlias])

Parameters

nIndexNumber


Specifies which compound index file name to return. If the table has a structural compound index file and nIndexNumber is 1, the name of the structural compound index file (which is always the same as the name of the table) is returned. If nIndexNumber is 2, the name of the first compound index file specified with USE or SET INDEX is returned. If nIndexNumber is 3, the second compound index file name is returned, and so on. If nIndexNumber is greater than the number of open compound index files, an empty string is returned. If the table doesn't have a structural compound index file and nIndexNumber is 1, the name of the first compound index file specified with USE or SET INDEX is returned. If nIndexNumber is 2, the second compound index file name is returned, and so on. If nIndexNumber is greater than the number of open compound index files, an empty string is returned.
nWorkArea


Specifies the work area number for compound index files open in work areas other than the current one. If you omit this optional argument, names of compound index files are returned for the current work area.
cTableAlias


Specifies the table alias for compound index files open in work areas other than the current one. If you omit this optional argument, names of compound index files are returned for the current work area.

Return Value

Character

Remarks

MDX(В ) is identical to CDX(В ).

Index files can be opened for a table with the INDEX clause of the USE command or with SET INDEX. A structural compound index file is automatically opened with its table. MDX(В ) ignores any .idx index files specified with USE or with SET INDEX.

Use TAG(В ) to return tag names from a compound index file; use NDX(В ) to return the name of an open .idx index file.

In Visual FoxPro for Windows, when SET FULLPATH is ON, MDX(В ) returns the path to the .cdx file with the .cdx file name. When SET FULLPATH is OFF, MDX(В ) returns the drive the .cdx file resides on with the .cdx file name.

See Also



JavaScript Editor js editor     Web development