[求助]向大家请教一个dataGridView的问题
请问一下,在dataGridView中修改数据后,怎样回存到数据库中,希望能告诉下直接代码的写法这是从数据库导入数据到dataGridView的代码
private void button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("server=.;database=comic;uid=sa;pwd=123");
SqlDataAdapter sda = new SqlDataAdapter("select * from 表1", con);
DataSet ds = new DataSet();
sda.Fill(ds, "表1");
dataGridView1.DataSource = ds;
dataGridView1.DataMember = "表1";
}
希望各位大大告知回存的写法,谢谢~~
[此贴子已经被作者于2007-2-25 11:11:14编辑过]