SQL Server does not exist or access denied. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: SQL Server does not exist or access denied.Source Error: 
Line 33: 
Line 34:         If Con.State = ConnectionState.Open Then Con.Close()
Line 35:         Con.Open()      '错误发生行
Line 36:         ' Response.End()
Line 37:         Dim cmd As New SqlCommand("select [name] from supp ", Con)
 Source File: C:\Inetpub\wwwroot\test\Suppliers.aspx.vb    Line: 35 Stack Trace: 
[SqlException: SQL Server does not exist or access denied.]
   System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +484
   System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
   System.Data.SqlClient.SqlConnection.Open() +384
   test.Suppliers.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\test\Suppliers.aspx.vb:35
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Page.ProcessRequestMain() +731  什么意思,该怎么解决?

解决方案 »

  1.   

    http://community.csdn.net/Expert/topic/3558/3558979.xml?temp=.298031  和这个一样,各种方法都是过了!!还是不行!!
           我要跳楼  !!
      

  2.   

    确保数据库名、UserID和password正确
      

  3.   

    提取数据的时候不要用datareader这种方式,这是微软害我们大家的,一出错的时候整个系统都hang掉
    ,强烈建议采用dataadapter提取datatable这种方式,我的站点到现在都没出现过你上面的错误,之前我的设计思路跟你的很相像,你看着办吧
      

  4.   

    你按这种重新写一遍连接看看Server=**(或者IP);Database=**;User ID=**;Password=**;Trusted_Connection=False
      

  5.   

    你把连接字符串改成如下形式试一试:
    server=YourServerName;database=yourdatabasename;uid=username;pwd=password;同时请检查试图打开连接的用户是否有相应的权限。
      

  6.   

    "If Con.State = ConnectionState.Open Then Con.Close()" 
    这句话 你判断的太武断了 假如 con处于其他状态 你如何 让他con.open呢
      

  7.   

    1、sql sp3装了没有?
    2、你的机器再装一下sql客户端试试。
      

  8.   

    SQL Server does not exist or access denied. 
    已经明确的告诉你错误在哪儿:Sqlserver不存在或拒绝访问。
    你并没有把你发生错误的核心代码帖出来。你应该把连接语句给帖出来。
    你现在代码中也有些问题,
    “If Con.State = ConnectionState.Open Then Con.Close()”
    这个可以不要,你记得每次打开之后关闭就行了。还有一点,你得看看你的SqlServer有没有启动,或者是SqlServer有没有正确的安装,有没有错误。
      

  9.   

    sql server中数据库安全看一下,你的用户有权限吗?