views:

6203

answers:

4

This should be painfully simple, but I cannot come up with a working connection string for a local copy of SQL Server 2008 using Windows Authentication. I've tried using the Data Link Properties tool to create a connection string and it has no problems connecting, but when I copy paste the generated string into my ADODB.Connection object's ConnectionString property I get all sorts of fun and different errors.

Set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionString = "SQLNCLI10.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=climb4acure;Data Source=(local);"

Microsoft OLE DB Service Components (0x80040E21) Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

I've tried a variety of similar connection strings but I cannot find one that will work with Windows Authentication. Can someone point me in the right direction?

Thanks!

+4  A: 

I assume you have the 2008 Native Client installed? Also, I noticed that you're missing the "provider" tag at the beginning - do you have any more luck with this one:

Provider=SQLNCLI10.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=climb4acure;Data Source=(local);
rwmnau
Perfect. Thank you!
Nathan Taylor
+1  A: 

Have you had a look at [connectionstrings.com]? They are a pretty good reference (but, in my experience, they don't work too well in the Google Chrome browser).

Paul Hanbury
Ya I've spent some time there trying variety of suggested connection strings and none of them seemed to work correctly.
Nathan Taylor
Nonetheless, I'm glad that you found an answer.
Paul Hanbury
A: 

Works! You are King!

A: 

connectionstring from sql server 2008 for asp classic

saeed
What is this answer?
Nathan Taylor