CLASSIC ASP-SQL Server不存在或访问被拒绝 [英] CLASSIC ASP - SQL Server does not exist or access denied

查看:139
本文介绍了CLASSIC ASP-SQL Server不存在或访问被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试连接到本地主机上的SQL Server Express数据库,但出现以下错误消息:

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

用于SQL Server的Microsoft OLE DB提供程序(0x80004005)

Microsoft OLE DB Provider for SQL Server (0x80004005)

[DBNETLIB] [ConnectionOpen(Connect()).] SQL Server不存在或 访问被拒绝.

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

我正在使用的代码是

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() 

有什么想法吗?

推荐答案

始终要检查的第一件事是您已将SQL Server配置为允许远程连接.

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

如何将SQL Server 2005配置为允许远程连接

有关常规SQL Server连接疑难解答,请参考以下

For generic SQL Server Connectivity Troubleshooting consult the following Blog Post

这篇关于CLASSIC ASP-SQL Server不存在或访问被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆