Click or drag to resize

Functions.VoDbOrdCreate Method

Create or replace an order in an index file.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.07
Syntax
 FUNCTION VoDbOrdCreate(
	cBagName AS STRING,
	uOrder AS USUAL,
	cExpr AS STRING,
	uCobExpr AS USUAL,
	lUnique AS LOGIC,
	ptrCondInfo AS DbOrderCondInfo
) AS LOGIC
View Source

Parameters

cBagName
Type: String
Orderbag name (index filename) to create the order in.
uOrder
Type: __Usual
Ordername to create.
cExpr
Type: String
The order key expression specified as a string
uCobExpr
Type: __Usual
The order key expression specified as a codeblock.
lUnique
Type: Boolean
TRUE creates a unique order by including only those records with unique key values; FALSE uses all records in the database file.
ptrCondInfo
Type: DbOrderCondInfo

Return Value

Type: Boolean
TRUE if successful; otherwise, FALSE.
Remarks
This function is like DbCreateOrder() but strongly typed and the condition information is passed in an object.

This function, however, does not call the error handler and will therefore not produce a runtime error message or create an error object if it fails.
Therefore it is important to check the return value to determine if the function succeeded.

The LastRddError property in the runtimestate will contain needed information about any error that occurs.


Tip Tip
The difference between VoDbOrdCreate and CoreDb.OrdCreate is that VoDbOrdCreate takes a USUAL parameter
See Also