Click or drag to resize

DbServer.CreateOrder Method

Create an order within an existing index file.  The behavior depends on which driver is used.

Namespace:  VO
Assembly:  VORDDClasses (in VORDDClasses.dll) Version: 2.5
Syntax
 VIRTUAL METHOD CreateOrder(
	cOrderName AS USUAL,
	cIndexFileName AS USUAL,
	cExpr AS USUAL,
	cbExpr AS USUAL,
	lUnique AS USUAL
) AS USUAL

Parameters

cOrderName
Type: Usual
The order name to be used.
cIndexFileName
Type: Usual
The name of the index file.
cExpr
Type: Usual
The indexing expression.
cbExpr
Type: Usual
The indexing expression.  If a code block is provided, it should match the string expression; if a code block is not provided, one is created from the string expression.
lUnique
Type: Usual
Whether the index is unique.  If not specified, the default is determined by SetUnique().

Return Value

Type: Usual
TRUE if successful; otherwise, FALSE.
Remarks
Sends a NotifyIntentToMove message before the operation.  Sends a NotifyFileChange message upon completion. This sample shows how to create a single tag order:
X#
1// If you want descending order by chance, then include this line first:
2<oDbServer>:SetOrderCondition(,,,,,,,,,,TRUE)
3IF <oDbServer>:CREATEORDER( "PlayerName", SELF:cPath + "Players", "Upper(LastName + FirstName + MiddleInit)" )
4<oDbServer>:Commit()
5ELSE
6// If the index tag was not created successfully, then tell somebody about it:  ….
7ENDIF
8// Don't forget to turn the ascending order back on:
9<oDbServer>:SetOrderCondition(,,,,,,,,,,FALSE)
DBCreateOrder() Function
See Also