当前位置: 首页 > 网络学院 > 服务端脚本教程 > ADO > ADO UpdateBatch 方法

ADO
ADO介绍
ADO数据库连接
ADO记录集
ADO显示记录
ADO查询语句
ADO记录排序
ADO添加记录
ADO更新记录
ADO删除记录
ADO演示
ADO提升执行速度
ADO Command对象
ADO Connection对象
ADO Error
ADO Field
ADO Parameter
ADO 属性
ADO Record
ADO Recordset
ADO Stream

ADO UpdateBatch 方法


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 399 ::
收藏到网摘: n/a

The UpdateBatch method is used to save all changes in a Recordset to the database. This method is used when you are working on a Recordset in batch update mode.
UpdateBatch方法的作用是:将所有的Recordset[记录集]更改信息保存到数据库中。你可以使用这个方法对记录集中的记录进行批量更新。

If the save operation fails, a run-time error occurs and the errors are stored in the Errors collection.
如果保存操作执行失败,那么将产生一个“运行时间”上的错误,并且该错误将被保存的Error[错误]集中。

Tip: The CancelBatch method cancels all batch updates.
提示:使用CancelBatch可以取消所有的批量更新操作。

Note: Not all Recordset objects supports batch updating.
注意:并不是所有的Recordset[记录集]对象都可以支持批量更新操作。

Syntax
语法

bool=objRecordset.UpdateBatch affectrecords

Parameter参数 Description描述
affectrecords Optional. An AffectEnum value that specifies which records this method will affect.
可选参数。指定一个AffectEnum值,它是由于指明使用该方法对哪条记录进行操作

Note: The value adAffectGroup will generate an error if there are no visible records in the Recordset
注意:如果记录集中不包含可视记录,那么adAffectGroup值将产生错误



AffectEnum Values

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

登陆 | 还没注册?