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

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 The WillChangeRecord 与 Re


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

The WillChangeRecord Event
WillChangeRecord事件

The WillChangeRecord event is triggered before one or more record changes.
WillChangeRecord事件是在一个或多个记录被更改前激发的。

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 notications.
注意:在返回这个事件之前,将status[状态]参数设置为adStatusCancel可以取消运行该事件的操作程序;或者将其设置为adStatusUnwantedEvent可以阻止接下来一系列的通告提示。

The RecordChangeComplete Event
RecordChangeComplete事件

The RecordChangeComplete event is triggered after one or more record have been changed.
RecordChangeComplete事件是在一个或多个记录被更改后激发的。

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

Note: The WillChangeRecord event or the RecordChangeComplete event may occur if you change a field in a record using one of the following Recordset operations: Update, Delete, CancelUpdate, AddNew, UpdateBatch, and CancelBatch.
注意:如果使用下列记录集操作中的其中一个操作来改变一个记录中的一个字段的话,WillChangeRecord事件或RecordChangeComplete事件可能会被触发:Update、Delete、CancelUpdate、AddNew、UpdateBatch和CancelBatch。

Syntax
语法

WillChangeRecord reason,numrec,status,objRs
RecordChangeComplete reason,numrec,objErr,status,objRs

Parameter参数 Description描述
reason An EventReasonEnum value that specifies the reason for this event
指定一个EventReasonEnum值。它是用来指定事件激发的原因的
numrec Indicates the number of records affected
指定需要更改的记录数量
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描述
adRsnAddNew 1

An operation added a new record
指定一个添加一条新记录的操作

adRsnDelete 2 An operation deleted a record
指定一个删除一条记录的操作
adRsnUpdate 3 An operation updated an existing record
指定一个更新现有记录的操作
adRsnUndoUpdate 4 An operation reversed the update of a record
指定一个反向更新记录的操作
adRsnUndoAddNew 5 An operation reversed the addition of a new record
指定一个发祥添加一条新记录的操作
adRsnUndoDelete 6 An operation reversed the deletion of a record
指定一个反向删除记录的操作
adRsnFirstChange 11 An operation made the first change to a record
指定一个用于第一次改变记录的操作


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

登陆 | 还没注册?