ConnectComplete and Disconnect Events (ADO)

Microsoft ActiveX Data Objects (ADO)

ConnectComplete and Disconnect Events

       

The ConnectComplete event is called after a connection starts. The Disconnect event 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 value that always returns adStatusOK.

When ConnectComplete is called, this parameter is set to adStatusCancel if a WillConnect event has requested cancellation of the pending connection.

Before either event returns, set this parameter to adStatusUnwantedEvent to prevent subsequent notifications. However, closing and reopening the Connection causes these events to occur again.

pConnection   The Connection object for which this event applies.