ADO events (1)---connectcomplete and Disconnect (connecti
Source: Internet
Author: User
ConnectComplete and Disconnect (ConnectionEvent) method
The ConnectComplete method is invoked after the connection begins. The Disconnect method is called after the connection ends.
Grammar
ConnectComplete perror, adstatus, pconnection
Disconnect adstatus, pconnection
Parameters
Perror the Error object. It represents an error that occurs when the value of the adstatus is adstatuserrorsoccurred, otherwise it is not set.
Adstatus EventStatusEnum value, always returns adStatusOK.
When ConnectComplete is invoked, the parameter is set to adStatusCancel if the WillConnect method has already requested that a pending connection be canceled.
Set this parameter to adStatusUnwantedEvent before returning any methods to avoid subsequent notifications. However, closing and reopening Connection can cause these events to occur again.
Pconnection the Connection object to which the event is directed.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service