Syntax
| WillConnect ConnectionString, UserID, Password, Options, adStatus, pConnection
| ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description
| This event can be called before the connection starts.You can change any of the parameters and even cancel the connection.
The WillConnect event can be fired just before a connection attempt is made. This event is one of three connection management events that can be called. The other two events are ConnectComplete and Disconnect.
An event is simply a subroutine that can be called automatically after a specific operation has occurred. This subroutine can contain any code that you need to run when the event occurs. The subroutine will only be called if it is included in your code. Future calls to the event subroutine can be cancelled by setting the adStatus parameter to be the adStatusUnwantedEvent constant (see table below) before the event returns.
There are six parameters that are passed to this event.
EventStatusEnum Constants
| ||||||||||||||||||||||||||||||||
See Also
| |||||||||||||||||||||||||||||||||
Example
| ' Use the WithEvents keyword to designate that events |