首先添加命名空间using System.Data.sqlclient;
具体代码为:
SqlConnection conn=new SqlConnection();
conn.ConnectionString="Server=.;database=数据库名;uid=sa;pwd= ;integrated Security=SSPI;persist Security info=false;";
conn.open();
首先添加命名空间using System.Data.sqlclient;
具体代码为:
SqlConnection conn=new SqlConnection();
conn.ConnectionString="Server=.;database=数据库名;uid=sa;pwd= ;integrated Security=SSPI;persist Security info=false;";
conn.open();