当前位置: 首页 > 网络学院 > 服务端脚本教程 > ADO > ADO WillChangeField 与 FieldCh
The WillChangeField event is triggered before the values of one or more Field Objects are changing.
WillChangeField事件是在一个或更多个的字段对象改变之前被激发。
Note: Before this event returns, set the status parameter to adStatusCancel to cancel the operation that caused this event.
注意:在返回这个事件之前,将status[状态]参数设置为adStatusCancel可以取消运行该事件的操作程序。
The FieldChangeComplete event is triggered after the values of one or more Field Objects have been changed.
FieldChangeComplete事件是在一个或更多个字段对象被改变之后被激发的。
Note: Before this event returns, set the status parameter to adStatusUnwantedEvent to prevent subsequent notifications.
注意:在你返回这个方法之前,将status[状态]参数设置为adStatusUnwantedEvent可以阻止接下来一系列的通告提示。
Note: The WillChangeField event and the FieldChangeComplete event may occur when you set the Value property and calls the Update method with field and value array parameters.
注意:当你设置属性值并且对“字段/值(即字段对应的值)”数组参数请求Update[更新]方法时,WillChangeField事件和FieldChangeComplete事件将会被触发。
WillChangeField numfields,fields,status,objRs FieldChangeComplete numfields,fields,objErr,status,objRs |
Parameter参数 | Description描述 |
---|---|
numfields | The number of Field objects in fields 指定字段集中包含的字段数量 |
fields | An array that contains Field objects with changes 制定一个数组。该数组包含了发生改变的字段对象 |
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 指定激发该事件的记录集对象的名称 |
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 在时间的运行方法终止运行之前禁止后续的报告 |