Click or drag to resize

DbServer.SetOrder Method

X#
Select an order from one of the open index files as the controlling order.

Namespace:  VO
Assembly:  VORDDClasses (in VORDDClasses.dll) Version: 2.19
Syntax
 VIRTUAL METHOD SetOrder(
	uOrder,
	cIndexFileName
) AS USUAL CLIPPER
Request Example View Source

Parameters

uOrder (Optional)
Type: Usual
The order can be identified by an order number, the position of the order in the order list, or a name.
cIndexFileName (Optional)
Type: Usual
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: Usual
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