Order Function | |
Returns the name of the controlling index file or tag for the current or specified table.
Namespace:
XSharp.VFP
Assembly:
XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax FUNCTION Order(
uArea,
nPath
) AS STRING CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public static string Order(
Usual uArea = default,
Usual nPath = default
)
Request Example
View SourceParameters
- uArea (Optional)
- Type: Usual
Specifies the work area of a table whose controlling index file name or controlling tag name Order( ) returns.
Or
Specifies a table alias whose controlling index file name or controlling tag name Order( ) returns.
- nPath (Optional)
- Type: Usual
Specifies that the drive and directory are returned along with the single-entry or compound index file name. The numeric expression nPath can have any value.
Return Value
Type:
String
Character
Remarks
A table can have several index files open simultaneously. However, only one single-entry index file (the controlling index file) or tag from a compound index file (the controlling tag) controls the order in which the table is displayed or accessed. Certain commands, such as SEEK, use the controlling index file or controlling tag to search for records. This function returns the name of the controlling index file or controlling tag.
Use and Set Index both support opening more than one index with an index file list. A controlling index file or controlling tag can be designated in this index file list. Set Order can also be used to designate a controlling index or controlling tag.
By default, Order( ) returns the controlling index file name or controlling tag name for the current work area. Order( ) returns the empty string if an order has not been set (Set Order TO is issued or there is no controlling index file or tag).
Examples 1Close Databases
2Open Database (HOME(2) + 'Data\testdata')
3Use customer Order cust_id
4? Order( )
5? Order('customer', 1)
See Also