//查询所有DataGridView绑定
string str =lianjieDAL .sql;
SqlConnection conn = new SqlConnection(str);
string sql = "select * from Student";
SqlDataAdapter da = new SqlDataAdapter();
SqlCommand comm = new SqlCommand(sql,conn);
da.SelectCommand = comm;
DataSet ds = new DataSet();
da.Fill(ds);
dgvStudent.DataSource=ds.Tables[0];
//C#查询所有DataGridView绑定
最新推荐文章于 2024-06-15 12:39:08 发布