Excel VBA connection string giving an error on my work machine but it works on my laptop
Posted on 2007-10-01
I have the following code in Excel VBA (2003):
On Error GoTo ErrHandler
Dim cmd As New ADODB.Command
Dim rs As New ADODB.Recordset
conn.ConnectionString = "Provider=SQLOLEDB.1;DataSource=NYDBTEST;Initial Catalog=CDOCash;Integrated Security=SSPI"
When I get to the conn.Open, the it triggers the following error:
"Invalid Connection String Attibute"
When I run it on my Laptop, this works fine. But when I put it on my machine at work, I get the error. I double checked the server and database. They are the correct names. My SQL Server both on my laptop and at work supports Windows Integrated Security.