Dim sqlConnect As String
Dim sqlConnection As ADODB.Connection
sqlConnect = "Provider = SQLOLEDB.1;Data Source=[%1%];Initial Catalog=[%2%];User ID=[%3%];Password=[%4%];"
'%1% = the name of the requested SQL server instance
'%2% = the name of the requested database
'%3% = a valid username who has access to the requested database
'%4% = relevenat password of valid user
Set sqlConnection = New ADODB.Connection
sqlConnection.ConnectionString = sqlConnect
sqlConnection.Open