<< Click to Display Table of Contents >>
The WillConnect event is called before a connection starts
METHOD WillConnect ( cConnStr, cUser, cPassword, lOptions, lStatus, oConn) CLASS AdoConnectionEvents
cConnStr A String that contains connection information for the pending connection
cUser A String that contains connection information for the pending connection
cPassword A String that contains the password for the pending connection
lOptions A Long value that indicates how the provider should evaluate the ConnectionString. Your only option is adAsyncOpen
lStatus An AdoEventStatusEnum status value. This parameter is set to adStatusOK if the operation that caused the event was successful, or to adStatusCantDeny if this event cannot request cancellation of the pending operation
oConn The Connection object for which this event notification applies.
When WillConnect is called, the ConnectionString, UserID, Password, and Options parameters are set to the values established by the operation that caused this event (the pending connection), and can be changed before the event returns. WillConnect may return a request that the pending connection be canceled.
AdoConnectionEvents, AdoEventStatusEnum, AdoConnection:Open