当前位置: 首页 > 网络学院 > 服务端脚本教程 > ADO > ADO WillChangeRecordset 与 Rec

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 WillChangeRecordset 与 Rec


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

The WillChangeRecordset Event
WillChangeRecordset事件

The WillChangeRecordset event is triggered before an operation changes the Recordset.
WillChangeRecordset事件是在记录集被更改前激发的。

Note: Before this event returns, set the status parameter to adStatusCancel to cancel the operation that caused this event or set it to adStatusUnwantedEvent to prevent subsequent notifications.
注意:在返回这个事件之前,将status[状态]参数设置为adStatusCancel可以取消运行该事件的操作程序;或者将其设置为adStatusUnwantedEvent可以阻止接下来一系列的通告提示

The RecordsetChangeComplete Event
RecordsetChangeComplete事件

The RecordsetChangeComplete event is triggered after a Recordset has changed.
RecordsetChangeComplete事件是在记录集被更改后激发的。

Note: Before this event returns, set the status parameter to adStatusUnwantedEvent to prevent subsequent notifications.
注意:在你返回这个方法之前,将status[状态]参数设置为adStatusUnwantedEvent可以阻止接下来一系列的通告提示。

Note: The WillChangeRecordset and the RecordsetChangeComplete event can occur when calling the Requery method or the Open method of a Recordset object.
注意:如果使用下列记录集操作中的其中一个操作来改变一个记录中的一个字段的话,WillChangeRecord事件或RecordChangeComplete事件可能会被触发:Update、Delete、CancelUpdate、AddNew、UpdateBatch和CancelBatch。

Syntax
语法

WillChangeRecord reason,status,objRs
RecordsetChangeComplete reason,objErr,status,objRs

Parameter参数 Description描述
reason An EventReasonEnum value that specifies the reason for this event
指定一个EventReasonEnum值。它是用来指定事件激发的原因的
status An EventStatusEnum value that indicates the status of the execution of the event
指定一个EventStatusEnum值,用于指示事件执行的状态
objErr The name of an Error object that describes the error if status is set to adStatusErrorsOccurred, otherwise it is not set
指定一个错误对象的名称。如果status[状态]设置为adStatusErrorsOccurred,那么该对象将描述具体的错误信息
objRs The name of the Recordset object that triggered this event
指定激发该事件的记录集对象的名称


EventReasonEnum Values

Constant常量 Value值 Description描述
adRsnRequery 7 An operation requeried the Recordset
指定一个请求记录集的操作
adRsnResynch 8 An operation resynchronized the Recordset with the database
指定一个使数据库与记录集同步操作的程序
adRsnClose 9 An operation closed the Recordset
指定一个关闭记录集的应用程序


EventStatusEnum Values

Constant常量 Value值 Description描述
adStatusOK 1

The operation that caused the event was successful
激发事件操作成功

adStatusErrorsOccurred 2 The operation that caused the event failed
激发事件操作失败
adStatusCantDeny 3 The operation that caused the event cannot be cancelled
不可以取消正处于处理执行中的操作
adStatusCancel 4 The operation that caused the event is cancelled
取消激发事件的操作
adStatusUnwantedEvent 5 Prevents subsequent notifications before the event method has finished executing
在时间的运行方法终止运行之前禁止后续的报告

评论 (0) All

登陆 | 还没注册?