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

ADO
ADO DataTypes
ADO 摘要
ADO 实例

ADO WillMove 与 MoveComplete


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

The WillMove Event
WillMove事件

The WillMove event is triggered before an operation changes the current position in the Recordset.
WillMove事件是在一个操作程序改变了记录集中记录的当前位置之前被激发的。

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 MoveComplete Event
MoveComplete事件

The MoveComplete event is triggered after the current position in the Recordset has changed.
MoveComplete事件是在一个操作程序改变了记录集中记录的当前位置之后被激发的。

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

Note: The WillMove event or MoveComplete event may occur when calling one of  the following Recordset method: Open, Move, MoveFirst, MoveLast, MoveNext, MovePrevious, AddNew, and Requery. These events may also occur because of the following properties: Filter, Index, Bookmark, AbsolutePage, and AbsolutePosition.
注意:WillMove事件或MoveComplete事件会在请求了下列Recordset[记录集]方法中的其中一个之后被触发:Open、Move、MoveFirst、MoveLast、MoveNext、MovePrevious、AddNew和Requery;同样地,设置了下列属性的其中一个也可能会触发上述事件:Filter、Index、Bookmark、AbsolutePage和AbsolutePosition。

Syntax
语法

WillMove reason,status,objRs
MoveComplete 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
指定一个请求记录集的操作
adRsnMove 10 An operation moved the record pointer within the Recordset
指定一个在记录集内移动记录指针的操作
adRsnMoveFirst 12 An operation moved the record pointer to the first record in the Recordset
指定一个将记录指针移动到记录集内第一条记录的操作
adRsnMoveNext 13 An operation moved the record pointer to the next record in the Recordset
指定一个将记录指针移动到记录集内下一条记录的操作
adRsnMovePrevious 14

An operation moved the record pointer to the previous record in the Recordset
指定一个将记录指针移动到记录集内上一条记录的操作

adRsnMoveLast 15 An operation moved the record pointer to the last record in 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

登陆 | 还没注册?