WillConnect

concerns

The WillConnect event is triggered if OpenConnection is running.

The event can be used if Microsoft Data Objects is available as a type library.

 

Syntax

WillConnect(ConnectionString, UserID, Password, Options, adStatus, pConnection)

Parameter

Name

Type

Passing

Description

ConnectionString

String

ByRef

Data source description

UserID

String

ByRef

User name

Password

String

ByRef

Password

Options

Long

ByRef

Connection options

adStatus

EventStatusEnum

ByRef

An EventStatusEnum Enumeration

Contains adStatusOK if the command execution for this event was successful. If an error occurs, the variable contains adStatusErrorOccurred. To avoid further events for this command, the value can be set to adStatusUnwantedEvent.

pConnection

ADODB.Connection

ByVal

An ADODB Connection object