w3pop.com :: 网络学院 :: ADO :: ADO CancelBatch 方法
The CancelBatch method cancels a batch update. The Recordset must be in batch update mode when calling this method.
CancelBatch的作用是:取消批量更新。当请求该方法时,记录集必须处于“批量更新”模式下。
Since you do not know what the current record will be after calling this property, you will have to move to a known record. For example, you could call the MoveFirst or MoveLast method, after a call to this method.
因为你在请求这个属性之后不会知道当前记录的具体是哪条,所以你不得不移动到一个未知的记录上。举个例子来说,你可以在请求该方法之后请求MoveFirst 或 MoveLast方法。
If this method fails, the provider will not stop the execution, but it will send a warning to the Errors Collection.
如果这个方法执行失败,那么技术提供对象[provider]不会停止执行程序,但是它将向Error[错误]集中发送一个警告信息。
objRecordset.CancelBatch affectrec |
| Parameter参数 | Description描述 |
|---|---|
| affectrec | Optional. An AffectEnum value that indicates which records this method will affect 可选参数。指定一个AffectEnum值,它是由于指明使用该方法对哪条记录进行操作 |
| Constant 常量 |
Value 值 |
Description 描述 |
|---|---|---|
| adAffectCurrent | 1 | Affects only the current record 仅取消当前记录的挂起更新 |
| adAffectGroup | 2 | Affects only records that satisfy the Filter setting (Filter must be set to a FilterGroupEnum value or an array of Bookmarks) 对满足当前 Filter 属性设置的记录取消挂起更新。使用该选项时,必须将 Filter 属性设置为合法的预定义常量之一 |
| adAffectAll | 3 | Affects all records if there is no Filter. Affects only visible records in the current chapter if Filter is set to a string criteria. Affect all rows of the Recordset if Filter is set to a FilterGroupEnum value or an array of Bookmarks 默认值。取消 Recordset 对象中所有记录的挂起更新,包括由当前 Filter 属性设置所隐藏的任何记录 |
| adAffectAllChapters | 4 | Affects all records in all child Recordset, including those hidden by a currently applied filter 写入所有子集(包括被当前使用的“过滤器[filter]”隐藏掉的子集)的挂起更改 |
评论 (0)
All