Open an index file and add specified orders to the order list in a work area.
XSharp.RT (in XSharp.RT.dll) Version: 2.7
Syntax Request Example
cIndexFile AS USUAL := NIL,
cOrder AS USUAL := NIL
) AS LOGIC
public static bool OrdListAdd(
Usual cIndexFile = null,
Usual cOrder = null
- cIndexFile (Optional)
- Type: Usual
The name of the index file to open, including an optional drive, directory, and extension for each. See SetDefault() and SetPath() for file searching and creation rules.
The default extension is determined by the RDD and can be obtained using DBOrderInfo(DBOI_INDEXEXT).
If <cIndexFile> does not exist, a runtime error is raised.
If it exists and is not already open by the current process, this function attempts to open the file in the same mode as the corresponding database file.
If access is denied because, for example, another process is using the file and this one is asking for exclusive use, NetErr() is set to TRUE.
Otherwise, the file open is successful.
Concurrency conflicts with index files are rare since they should be used with only one database file.
If a concurrency problem arises, it will normally be when you attempt to open the database file.
- cOrder (Optional)
- Type: Usual
The name of a specific order to add.
If not specified, all orders in the index file are added to the order list. Invalid values are ignored.
Using this argument can be dangerous, because the orders in <cIndexFile> that are not added to the order list will not be kept up to date with changes made to the database file.
TRUE if successful; otherwise, FALSE.
Except for its ability to select orders from the index file, it is functionally equivalent to DBSetIndex(), which you can refer to for more information.
Examples See Also