Click or drag to resize

OrdListAdd Function

X#
Open an index file and add specified orders to the order list in a work area.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.21
Syntax
 FUNCTION OrdListAdd(
	cIndexFile,
	cOrder
) AS LOGIC CLIPPER
Request Example View Source

Parameters

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.
Important!
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.

Return Value

Type: Logic
TRUE if successful; otherwise, FALSE.
Remarks
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