VBA/Excel/Access/Word/Access/Connection String
Версия от 16:33, 26 мая 2010; (обсуждение)
Use parameter name connection string
Sub ConnectionExample2()
Dim conn As ADODB.Connection
Set conn = New ADODB.Connection
conn.Open "Provider = Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & CurrentProject.Path & _
"\mydb.mdb"
MsgBox "Connection was opened"
conn.Close
Set conn = Nothing
MsgBox "Connection was closed"
End Sub