LoadDataRow应用例子
public void ExecuteInsert()
{
SqlConnection con = new SqlConnection("server=(local);uid=sa;pwd=sa;database=HljCost");
SqlDataAdapter da = new SqlDataAdapter("SELECT * FROM [Manager]",con);
da.MissingSchemaAction = MissingSchemaAction.AddWithKey;
SqlCommandBuilder cb = new SqlCommandBuilder(da);
DataSet ds = new DataSet();
da.Fill(ds);
DataRow dr = ds.Tables[0].NewRow();
dr["MID"] = 0;
dr["MuserID"] = 2;
dr["Mpass"] =3;
dr["Type"] = 1;
ds.Tables[0].BeginLoadData();
ds.Tables[0].LoadDataRow(dr.ItemArray,false);
ds.Tables[0].EndLoadData();
this.Response.Write(da.Update(ds.Tables[0]));
}