1

I have just moved from Vista to Windows 7 with my development environment and ALL OF A SUDDEN my web app cannot connect to the local SQL Server instance

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

Funily enough, SQL Management studio express can connect fine. The connection string im using is:

Provider=SQLOLEDB.1;User ID=sa;Initial Catalog=mydatabase;Data Source=.\myinstance;Password=xxx

Does anyone have any idea as to why?

Jimbo
  • 309
  • 1
  • 5
  • 16

4 Answers4

1

Thanks all for your responses, I fixed the problem by changing the connection string as follows:

Provider=SQLOLEDB.1;Network Library=DBNMPNTW;User ID=sa;Initial Catalog=mydatabase;Data Source=\\.\pipe\MSSQL$myinstance\sql\query;Password=xxx
Jimbo
  • 309
  • 1
  • 5
  • 16
0

Try to configure the ALIAS on Microsoft Client Network Configuration.

lg.
  • 4,649
  • 3
  • 21
  • 20
0

Check the status of the "Login" that you are using, through SSMS. Also read the error for any error messages.

Nomad
  • 471
  • 2
  • 3
0

Perhaps you installed the database instance in Windows Only authentication mode and sa is disabled.

Sam
  • 2,020
  • 1
  • 16
  • 22