The ConnectComplete method is called after a connection starts. The Disconnect method is called after a connection ends.
Syntax
ConnectComplete pError, adStatus, pConnection
Disconnect adStatus, pConnection
Parameters
pError An Error object. It describes the error that occurred if the value of adStatus is adStatusErrorsOccurred; otherwise it is not set.
adStatus An EventStatusEnum status value. When either of these methods is called, this parameter is set to adStatusOK if the operation that caused the event was successful, or adStatusErrorsOccurred if the operation failed.
When ConnectComplete is called, this parameter is set to adStatusCancel if a WillConnect method has requested cancellation of the pending connection.
Before either method returns, set this parameter to adStatusUnwantedEvent to prevent subsequent notifications.
pConnection The Connection object for which this event applies.