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

紧急求救!!!!!!VS2005+SqlServer2000连接出错啊.....
我用VS2005远程连接Sql2000时,老出问题,下面是错误提示

打开数据失败:System.Data.SqlClient.SqlException:   在建立与服务器的连接时出错。在连接到   SQL   Server   2005   时,在默认的设置下   SQL   Server   不允许进行远程连接可能会导致此失败。   (provider:   命名管道提供程序,   error:   40   -   无法打开到   SQL   Server   的连接)
      在   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException   exception,   Boolean   breakConnection)
      在   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject   stateObj)
      在   System.Data.SqlClient.TdsParser.Connect(Boolean&   useFailoverPartner,   Boolean&   failoverDemandDone,   String   host,   String   failoverPartner,   String   protocol,   SqlInternalConnectionTds   connHandler,   Int64   timerExpire,   Boolean   encrypt,   Boolean   trustServerCert,   Boolean   integratedSecurity,   SqlConnection   owningObject,   Boolean   aliasLookup)
      在   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection   owningObject,   SqlConnectionString   connectionOptions,   String   newPassword,   Boolean   redirectedUserInstance)
      在   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity   identity,   SqlConnectionString   connectionOptions,   Object   providerInfo,   String   newPassword,   SqlConnection   owningObject,   Boolean   redirectedUserInstance)
      在   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions   options,   Object   poolGroupProviderInfo,   DbConnectionPool   pool,   DbConnection   owningConnection)
      在   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection   owningConnection,   DbConnectionPool   pool,   DbConnectionOptions   options)
      在   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection   owningObject)
      在   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection   owningObject)
      在   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection   owningObject)
      在   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection   owningConnection)
      在   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection   outerConnection,   DbConnectionFactory   connectionFactory)
      在   System.Data.SqlClient.SqlConnection.Open()


在网上查了好多,没有一个能解决的,晕啊....
sql2000   sp4也装了,   还有就是我也没有装sqlserver2005啊...,   这是为什么啊...,请高手们帮忙啊...,快疯了

------解决方案--------------------
VS2005里自带了免费的SQL 2005 Express版,安装时是可选择的
看一下你现在运行的SQL SERVER服务器是哪个
------解决方案--------------------
看一下这个帖子,也许有帮助:
http://community.csdn.net/Expert/topic/5202/5202630.xml?temp=.4110071
------解决方案--------------------
试试设置IIS中的2.0修改成1.1
------解决方案--------------------
这个问题只靠运气解决过,还以为仅会出现在SQL Server 2005,原来2000也会……
------解决方案--------------------
先看看用查询分析器能远程连不。
检查你的防火墙设置。
看看服务起来没
看看端口打开没