Click or drag to resize

OrdListAdd Function

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.08
	 cIndexFile AS USUAL,
	 cOrder AS USUAL
View Source


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).  See the "RDD Specifics" appendix in the Programmer's Guide for details on a particular RDD.
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.  Refer to the "Concurrency Control" chapter in the Programmer's Guide for more information on resolving concurrency conflicts.
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: Boolean
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.