DbServer.SetOrder Method (Usual, String)
Select an order from one of the open index files as the controlling order.
XSharp.VORDDClasses (in XSharp.VORDDClasses.dll) Version: 2.18
Syntax Request Example
VIRTUAL METHOD SetOrder(
uOrder AS USUAL,
cIndexFileName AS STRING
) AS LOGIC
public virtual bool SetOrder(
[DefaultParameterValueAttribute("", 0)] string cIndexFileName
- Type: Usual
The order can be identified by an order number, the position of the order in the order list, or a name.
- Type: String
If the order is specified by an order name that is not unique within the order list, the index file name can be specified, either as a FileSpec object or as a file name in string format, with or without file type. File type defaults to the native type for the driver (RDD). Note, however, that SetOrder() does not open the index file, it refers only to orders within already opened files.
TRUE if successful; otherwise, FALSE.
Sends a NotifyFileChange message, if successful.
The server remains positioned on the same record after the controlling order is changed. Note that when a dbServer object is first instantiated, and the CDX index driver is used and auto-open indexes is set to TRUE, then the tag that will be opened will be the first tag identified alphabetically – NOT the sequence that you created the tags in. Thus a SetOrder() should typically be set before performing any sort of Seek() operation to ensure that the proper index tag is set.