void dataGridViewRefesh()
{
dataGridView1DataSource = null;
SqlConnection con = new SqlConnection(@"server=(local);Integrated security=SSPI;database=你的数据库名");
SqlDataAdapter Ader=new SqlDataAdapter("select from [你的表名]",con);
DataSet Dset;
AderFill(Dset,"Table1");
dataGridView1DataSource=DsetTable["Table1"]DefaultView;
dataGridView1Refresh();
DsetDispose();
AderDispose();
conClose();
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)