Click or drag to resize

DbServer.CreateOrder Method

X#
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.19
Syntax
 VIRTUAL METHOD CreateOrder(
	cOrderName,
	cIndexFileName,
	cExpr,
	cbExpr,
	lUnique
) AS USUAL CLIPPER
Request Example View Source

Parameters

cOrderName (Optional)
Type: Usual
The order name to be used.
cIndexFileName (Optional)
Type: Usual
The name of the index file.
cExpr (Optional)
Type: Usual
The indexing expression.
cbExpr (Optional)
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 (Optional)
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