SqlCommand cmd = new SqlCommand();
cmd.CommandText = "********";
cmd.Connection = conn;
SqlDataAdapter sda = new SqlDataAdapter();
sda.SelectCommand = cmd;
//创建DataSet对象
DataSet ds = new DataSet();
sda.Fill(ds);
this.GridView1.DataSource = ds;
this.GridView1.DataSource = ds.Tables[0];
this.GridView1.DataBind();
conn.Close();
怎么把GridView显示的所有数据插入MSSQL表中? 谢谢!!!
cmd.CommandText = "********";
cmd.Connection = conn;
SqlDataAdapter sda = new SqlDataAdapter();
sda.SelectCommand = cmd;
//创建DataSet对象
DataSet ds = new DataSet();
sda.Fill(ds);
this.GridView1.DataSource = ds;
this.GridView1.DataSource = ds.Tables[0];
this.GridView1.DataBind();
conn.Close();
怎么把GridView显示的所有数据插入MSSQL表中? 谢谢!!!
写过40+个列的GRID....保存的...