Occurs after a request to start a connection.
property OnWillConnect: TWillConnectEvent;
__property TWillConnectEvent OnWillConnect;
Write an OnWillConnect event handler to take specific action before a connection starts and after the provider indicates the connection attempt can be made. The OnWillConnect event fires after the corresponding operation (requesting a connection attempt) has executed at the ADO Connection object. Calling the Open method or setting the Connected property to true will lead to this event occurring.
Connection indicates the TADOConnection component attempting the connection.
ConnectionString contains the connection information for the pending connection.
UserID contains the user identification for the pending connection.
Password contains the password for the pending connection.
ConnectionOptions contains the TConnectOption value that describes how the provider is to evaluate the connection string for the pending connection.
The EventStatus value (ADO EventStatusEnum) indicates the success or failure of the execution of the operation that triggered the event. In a handler for this event, set this parameter to esCancel to request cancellation of the pending connection operation.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!