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

ADO
ADO DataTypes
ADO 摘要
ADO 实例

ADO Resync 方法


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

The Resync method refreshes the data in a Recordset.
Resync的作用是:刷新Recordset[记录集]对象中的数据。

Tip: Use this method to resynchronize the Recordset with the database. If you want to see changes in the database and you are using a static or forward-only Recordset, this method is useful.
提示:使用这个方法可以使记录集和数据库的信息刷新同步。如果你希望即时查看数据库中的数据信息变更或正在使用静态记录集或指针前置(仅支持指针向前移动)记录集,那么使用该方法将非常有效。

Note: This method does not re-execute the Recordset, so new records in the database will NOT be visible.
注意:这个方法不能记录集对象中重复执行,所以数据库中的新记录将不可见。

Syntax
语法

objRecordset.Resync affectrecords,resyncvalues

Parameter参数 Description描述
affectrecords Optional. An AffectEnum value that specifies which records this method will affect. Default is adAffectAll
可选参数。指定一个AffectEnum值,用于指定该方法对哪条记录进行刷新。默认值为:adAffectAll
resyncvalues Optional. A ResyncEnum value that specifies if underlying values are overwritten. Default is adResyncAllValues
可选参数。指定一个ResyncEnum值,用于指定是否允许覆盖原值。默认为:adResyncAllValues


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必须设置为一个FilterGroupEnum值或是一个书签数组)
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
如果未指定Filter,那么则刷新所有记录。如果Filter规定为一个字符串[string]规则,那么仅刷新当前可视记录;如果Filter未设置为一个FilterGroupEnum值或是一个书签数组,那么将刷新记录集中的所有记录信息)
adAffectAllChapters 4 Affects all records in all child Recordset, including those hidden by a currently applied filter
刷新所有子记录集记录,包括被当前filter隐藏的记录


ResyncEnum Values

Constant
常量
Value值 Description
描述
adResyncAllValues 2 Default. Overwrites data, and pending updates are canceled
默认值。允许覆盖数据,取消挂起的更新操作
adResyncUnderlyingValues 1 Does not overwrite data, and pending updates are not canceled
不允许覆盖数据,不取消挂起的更新操作

评论 (0) All

登陆 | 还没注册?