各位大侠:帮我看看这两句表示什么吧?
1。string connstr="server=local;Integrated Security='sa';database=spcdata"; 
这里的Integrated Security后面应该等于什么?我现在填的是SQL SERVER的密码,没有运行出来。2。string str=dc.connstr ;
   SqlConnection conn=new SqlConnection (str); 
这里是连接数据库的,但是我会报错,帮我看看是怎么回事吧?
谢谢大虾拉~

解决方案 »

  1.   

    1.integrated security=sspi 2.报什么错?
    SqlConnection conn=new SqlConnection (str); 
    其中的str可能有问题,比如参数设置不对
      

  2.   

    1.那个是Windows身份验证,是需要系统登陆密码.
    2.什么错误。一般只有string str=dc.connstr ;
       SqlConnection conn=new SqlConnection (str); 
    这两句话是不会出错的,出错的都是在连接打开的时候。
      

  3.   

    use this string,it is esay to understand
    str="datasource=(local);user id=sa;password=;initial catalog=dbname";
      

  4.   

    你的数据库是用什么方式访问的?你的问题可能出自你的连接字符串如果是“集成安全访问”就用ice_frank(NULL)的方式,改一下连接字符串;如果是用“密码验证”的方式访问,就用 yistudio(阳光灿烂的日子) 的方式写;不知我说的对不对,高手来看看!