I connect from classic ASP page to SQL SERVER 2008 R2 with following connection string
"Data Source=(local);Initial Catalog=my_db;Persist Security Info=True;User ID=my_user;Password=my_pass;"
but I get error
Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
I verified that my_db exists!, so what is wrong in my connection string?
The
(local)name you’ve given for your data source is invalid. It should be an IP address, server name or server/instance name of your SQL installation.UPDATE
If the SQL server is on the webserver you can use
.to specify local. Here’s an example connection string from one of my classic ASP projects:"Provider=SQLNCLI10;Server=.;Database=my_db;Uid=user;Pwd=pass;"