DataSet ds = new DataSet();
SqlConnection con = new SqlConnection("server = .; database = Cartoon; uid = sa; pwd = ok");
SqlCommand cmd = con.CreateCommand();
cmd.CommandText = sql;
cmd.Parameters.AddWithValue("@emid", emid);
dsCommand = new SqlDataAdapter(cmd);
dsCommand.Fill(ds);
return ds;
请问,如果是Windows集成验证,就不需要用户名和密码了。那我的连接字符串还要写吗?SqlConnection连接怎么办?