D
David Cowen
The code below seems to switch successfully from one sql
database to another but when I click on File, Connection,
the database has not changed.
Thanks,
David Cowen
Dim cnnDB As ADODB.Connection
Dim ProvStr As String
Dim rs As ADODB.Recordset
' Initialize Connection object
Set cnnDB = New ADODB.Connection
With cnnDB
.Provider = "SQLOLEDB.1"
ProvStr = "Server=Eglsql1; _
Database=Ems_Live;Trusted_Connection=yes;"
.Open (ProvStr)
End With
database to another but when I click on File, Connection,
the database has not changed.
Thanks,
David Cowen
Dim cnnDB As ADODB.Connection
Dim ProvStr As String
Dim rs As ADODB.Recordset
' Initialize Connection object
Set cnnDB = New ADODB.Connection
With cnnDB
.Provider = "SQLOLEDB.1"
ProvStr = "Server=Eglsql1; _
Database=Ems_Live;Trusted_Connection=yes;"
.Open (ProvStr)
End With