当前位置: 首页 > 网络学院 > 服务端脚本教程 > ADO > ADO WillConnect, ConnectComple
An event is a subroutine that can be called automatically after a specific operation has occurred.
事件就是在一个具体操作发生之后自动请求的一个字程序。
WillConnect ConnectionString,userid,psword,options,status,objcon ConnectComplete objerror,status,objconn Disconnect status,objconn |
Parameter参数 | Description描述 |
---|---|
ConnectionString | A string that contains the information required for the connection 指定一个包含了连接所需信息的字符串 |
userid | A string that contains the user name for the connection 指定一个包含连接用户名的字符串 |
psword | A string that contains the password for the connection 指定一个包含连接密码的字符串 |
options | A long value that specifies how the provider should evaluate the ConnectionString. Can only be set to adAsyncOpen 指定一个长值,用于指定技术提供对象[provider]如何对ConnectionString进行评估。它的值只能被设置为adAsyncOpen |
objerror | An Error object that contains the errors that occurred 包含所发生的错误的Error对象 Note: The EventStatusEnum value must be set to adStatusErrorsOccurred to create the Error object |
status | An EventStatusEnum value. Default is adStatusOK 指定一个EventStatusEnum值。默认值为adStatusOK However, when the ConnectComplete event is called, this parameter is set to adStatusCancel IF a WillConnect event calls for cancelling of the pending connection |
objconn | The Connection object that fired the event 用于激发事件的连接对象 |
Constant 常量 | Value值 | Description描述 |
---|---|---|
adStatusOK | 1 | The operation that fired the event was successful 激发事件操作成功 |
adStatusErrorsOccurred | 2 | The operation that fired the event failed 激发事件操作失败 |
adStatusCantDeny | 3 | Cannot cancel the pending operation 不可以取消正处于处理执行中的操作 |
adStatusCancel | 4 | Cancels the operation that fired the event 取消激发事件的操作 |
adStatusUnwantedEvent | 5 | Prevents subsequent notifications before the event method has finished executing 在时间的运行方法终止运行之前禁止后续的报告 |