SqlConnection("server=CNDB01;database=vote;uid=sa;pwd=;")Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection.在SQL server 2000中修改Sql server autherition 為windows autherition 
即可連接。在2005中我也改,但改不了!如果我要連接2005,應該怎樣設置呢?

解决方案 »

  1.   

    SQL server 2005安装选的混合模式吗?
      

  2.   

    试一下这个
    SqlConnection("server=CNDB01;database=vote;Integrated Security=SSPI")
      

  3.   

    我選的是windows autherition 安裝的。
      

  4.   

    我在我的連接字符串中加了一個Trusted_Connection=yes如下:
    SqlConnection("server=CNDB01;Trusted_Connection=yes;database=vote;uid=sa;pwd=;")
    然後就可以使用了,但搞不懂為什麼?
      

  5.   

    中国易网http://www.1-space.cn
    【100MB  支持ASP/cgi/php     70 RMB/1年  】
    【1G空间 支持ASP cgi php          200 RMB/1年 】
    【     现在购买1G空间,cn域名只卖25        】
     【100M共享1u服务器南京电信托管4300,2U托管4500,全国最低价】
      

  6.   

    这和你安装SQL server 2005时选择的登陆方式有关。
      

  7.   

    “我選的是windows autherition 安裝的。”所以我认为sa是不行的。应该可以改变认证模式。