代码如下
DataSet ds1 = (DataSet)this.dataGrid2.DataSource;
DataTable dt1 = ds1.Tables["E_Store"];
DataSet ds2 = (DataSet)this.dataGrid3.DataSource;
DataTable dt2 = ds2.Tables["P_Store"]; try
{
string strconn = "Provider=Microsoft.Jet.OleDb.4.0;"+"Data Source= " +filepath+dbname+ ";";
OleDbConnection conn = new OleDbConnection(strconn);
conn.Open(); if(tabControl3.SelectedTab == tabPage9)
{
OleDbCommand com1 = new OleDbCommand("SELECT * FROM E_Store", conn);
OleDbDataAdapter ad1 = new OleDbDataAdapter();
ad1.SelectCommand = com1;
OleDbCommandBuilder cb1 = new OleDbCommandBuilder(ad1);
ad1.Fill(ds1, "E_Store");
ad1.Update(ds1, "E_Store");
MessageBox.Show("Save succeccfully!");
  }
if(tabControl3.SelectedTab == tabPage10)
{
OleDbCommand com2 = new OleDbCommand("SELECT * FROM P_Store", conn);
OleDbDataAdapter ad2 = new OleDbDataAdapter();
ad2.SelectCommand = com2;
OleDbCommandBuilder cb2 = new OleDbCommandBuilder(ad2);
ad2.Fill(ds2, "P_Store");
ad2.Update(ds2, "P_Store");
MessageBox.Show("Save succeccfully!");   
} conn.Close(); }
catch (Exception err)
{
MessageBox.Show(err.Message);
}为什么我在更新数据的时候数据库一切正常,但是datagrid同时显示更新后的row还有更新前的row?也就是有多出来一行(更新后的)