Server Error in '/WebApplication' Application.
--------------------------------------------------------------------------------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.我用C#程序連接到另一台機子的Sql server 2000 數據庫,出現以上錯誤
但連接串和程序代碼是正確的(我嘗試連接到其它機子的sql服務器,可以取到數據回來)
連接串 private static string connStr = "server=10.168.0.45;uid=sa;pwd=;database=master";                           da = new SqlDataAdapter(cmdStr,conn);
Line 93:  DataTable dt = new DataTable();
Line 94:  da.Fill(dt);   //這裡出錯
Line 95:  da.Dispose();大家幫個忙啊,先謝謝了

解决方案 »

  1.   

    你先在自己的机器上注册一下sql看能不能连上嘛
    你那个还是连接服务器出问题咯,试试server用机器名咯
      

  2.   

    在我的sql上注冊那台機子的server是成功的,但用代碼就出錯
      

  3.   

    在vs.net IDE中创建一个SQLConnection对象,看你那个连接字符串能不能成功连接
      

  4.   

    不知道是不是因为另外一台机子的Guest用户原因
    有时没有启用也不会登录成功的
      

  5.   

    SQL Server does not exist or access denied
    地址寫錯了,或者用戶名密碼不能登錄
      

  6.   

    To lldwolf(铁背苍狼):
       連接上了,但運行程序到數據庫連接的代碼時就出錯。
    To chuxue1342(@楚}===天{==========雪饮>) :
       也連接的,就是運行調試的時候出錯
      

  7.   

    那台Sql server 服務器沒有停,服務器系統是win2003的,是不是哪裡權限需要配置啊?