Ndx Function | |
Returns the name of an open index (.IDX) file for the current or specified table.
Namespace:
XSharp.VFP
Assembly:
XSharp.VFP (in XSharp.VFP.dll) Version: 2.21
Syntax FUNCTION Ndx(
nIndexNumber,
uArea
) AS STRING CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public static string Ndx(
Usual nIndexNumber = default,
Usual uArea = default
)
Request Example
View SourceParameters
- nIndexNumber (Optional)
- Type: Usual
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.
- uArea (Optional)
- Type: Usual
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.
Or
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, X# generates an error message. If you omit cTableAlias, NDX( ) returns the names of .idx files open with the table in the current work area.
Return Value
Type:
String
Character
Remarks
The CDX( ) and MDX( ) functions can be used to return the names of open compound (.cdx) index files.
In X# for Windows, when Set FullPath is ON, NDX( ) returns the path to the .idx file with the .idx file name. When Set FullPath is OFF, NDX( ) returns the drive the .idx file resides on with the .idx file name.
See Also