Click or drag to resize

CoreDb.OrdCreate Method

X#
Create or replace an order in an index file.

Namespace:  XSharp
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax
 STATIC METHOD OrdCreate(
	cBagName AS STRING,
	oOrder AS Object,
	cExpr AS STRING,
	oCodeBlock AS ICodeblock,
	lUnique AS LOGIC,
	ordCondInfo AS DbOrderCondInfo
) AS LOGIC
Request Example View Source

Parameters

cBagName
Type: String
Orderbag name (index filename) to create the order in.
oOrder
Type: Object
cExpr
Type: String
The order key expression specified as a string
oCodeBlock
Type: ICodeblock
lUnique
Type: Logic
TRUE creates a unique order by including only those records with unique key values; FALSE uses all records in the database file.
ordCondInfo
Type: DbOrderCondInfo
An object defining the condition and scope information.

Return Value

Type: Logic
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.
See Also