CLASSIC ASP - SQL Server does not exist or access denied

3

I'm trying to make a connection to a SQL Server Express DB on localhost, but I get the following error message:

Microsoft OLE DB Provider for SQL Server (0x80004005)

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

The code I'm using is

Dim connection 
Set connection = CreateObject("ADODB.connection") 
connection.connectionString = "server=localhost;Provider=SQLOLEDB;Data Source=RiskManagement;Initial Catalog=RiskManagement;User ID=sa;Password=myPass;" 
connection.Open() 

Any ideas?

sql-server
asp-classic
asked on Stack Overflow Sep 11, 2009 by thegunner • edited May 14, 2012 by bluish

3 Answers

3

First thing to always check is that you have configured SQL Server to allow remote connections.

How to configure SQL Server 2005 to allow remote connections

For generic SQL Server Connectivity Troubleshooting consult the following Blog Post

answered on Stack Overflow Sep 11, 2009 by John Sansom
0

I also faced same issue, when I investigated around the network connectvity then I come to know from application server (example Windows 10.10.10.10 or AppServer) is unable to connect database server (Like DBServer or 10.10.10.11). So once check whether it's pinging from the application server, where application is hosted or located.

answered on Stack Overflow Jul 3, 2012 by Narender Kumar • edited Oct 11, 2012 by Andrew Barber
0

I got this issue because ESET firewall was on. I installed an update of a VB6 program. The new .exe had to be entered into the firewall

answered on Stack Overflow Aug 7, 2018 by Kirsten Greed

User contributions licensed under CC BY-SA 3.0