I use this connection and SqlServer 2005
Code: Select all
Set Cnxn = New ADODB.Connection
strCnxn = "Provider='sqloledb';Data Source='myserver';" & _
"Initial Catalog='mydb';Integrated Security='SSPI';"
Cnxn.Open strCnxn
Code: Select all
Set Cnxn = New ADODB.Connection
strCnxn = "Provider='sqloledb';Data Source='myserver';" & _
"Initial Catalog='mydb';Integrated Security='SSPI';"
Cnxn.Open strCnxn