点击或拖拽改变大小

CoreDb.OrdCreate 方法

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

命名空间:  XSharp
程序集:  XSharp.Core (在 XSharp.Core.dll 中) 版本:2.22 GA
语法
 STATIC METHOD OrdCreate(
	cBagName AS STRING,
	oOrder AS Object,
	cExpr AS STRING,
	oCodeBlock AS ICodeblock,
	lUnique AS LOGIC,
	ordCondInfo AS DbOrderCondInfo
) AS LOGIC
查看代码

参数

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

返回值

类型:Boolean
TRUE if successful; otherwise, FALSE.
备注
This function is like DbCreateOrder() but strongly typed and the condition information is passed in an object. 这个函数,不会调用错误处理程序,因此如果失败,不会产生运行时错误消息或创建错误对象。 因此,检查返回值以确定函数是否成功是很重要的。

LastRddError 属性将包含关于发生的任何错误的必要信息。
参见