日期:2014-05-20  浏览次数:20421 次

紧急求助asp.net2.0程序连接sqlserver2000数据库出现问题
紧急求助asp.net2.0程序连接sqlserver2000数据库出现问题
服务器配置:
windows2003
framework2.0
framework1.1
sqlserver2000

出现如下错误:(查看错误网址:http://union.tesu.cn)


An   error   has   occurred   while   establishing   a   connection   to   the   server.     When   connecting   to   SQL   Server   2005,   this   failure   may   be   caused   by   the   fact   that   under   the   default   settings   SQL   Server   does   not   allow   remote   connections.   (provider:   Named   Pipes   Provider,   error:   40   -   Could   not   open   a   connection   to   SQL   Server)  


------解决方案--------------------
把server先改成你的计算机名字看看行不行
------解决方案--------------------
你的机器当前的SQL Server默认实例不是什么SQL Server2000,而是2005。

使用企业管理器察看一下默认实例是否真的是2005,还是以前装的SQL Server2005没有卸载干净。

如果是2005,默认它是不允许远程访问的,需要在系统配置中将端口打开。

参考:http://www.google.com/search?hl=zh-CN&newwindow=1&rls=com.microsoft%3Aen-US&q=SQL+server+2005+%E8%BF%9C%E7%A8%8B%E7%AB%AF%E5%8F%A3&lr=