DbServer.SetOrder Method (Usual, String) | |
Select an order from one of the open index files as the controlling order.
Namespace:
XSharp.VO.SDK
Assembly:
XSharp.VORDDClasses (in XSharp.VORDDClasses.dll) Version: 2.19
Syntax VIRTUAL METHOD SetOrder(
uOrder AS USUAL,
cIndexFileName AS STRING
) AS LOGIC
public virtual bool SetOrder(
Usual uOrder,
[DefaultParameterValueAttribute("", 0)] string cIndexFileName
)
Request Example
View SourceParameters
- uOrder
- Type: Usual
The order can be identified by an order number, the position of the order in the order list, or a name. - cIndexFileName
- 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.
Return Value
Type:
Logic
TRUE if successful; otherwise, FALSE.
Remarks
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.
See Also