J
John
Hi,
I'm conneting my dataset to an Access MDB file using the Jet 4 OLE
connector.
I read in my data using:
oleDbDataAdapter.Fill(myDataSet.E);
I display this dataset using a datagrid.
I need to allow the user to delete all the entries in the database. I
tried calling Clear() on the DataTable and myDataSet.E.Rows.Clear().
This removes the rows from the dataset, but when I call
oleDbDataAdapter.Update(energyDataSet.E) they aren't removed from the
database.
So I figured that I need to call .Delete() to have the RowState set
properly for each row. So I'm doing this:
for (int i=0; i < myDataSet.E.Rows.Count; i++)
{
myDataSet.E.Rows.Delete();
}
This takes a really long time. It takes 10 seconds to delete 50
records. Is this reasonable?
What should I be doing differently?
THANKS!
John
I'm conneting my dataset to an Access MDB file using the Jet 4 OLE
connector.
I read in my data using:
oleDbDataAdapter.Fill(myDataSet.E);
I display this dataset using a datagrid.
I need to allow the user to delete all the entries in the database. I
tried calling Clear() on the DataTable and myDataSet.E.Rows.Clear().
This removes the rows from the dataset, but when I call
oleDbDataAdapter.Update(energyDataSet.E) they aren't removed from the
database.
So I figured that I need to call .Delete() to have the RowState set
properly for each row. So I'm doing this:
for (int i=0; i < myDataSet.E.Rows.Count; i++)
{
myDataSet.E.Rows.Delete();
}
This takes a really long time. It takes 10 seconds to delete 50
records. Is this reasonable?
What should I be doing differently?
THANKS!
John