A
Andy B
I have the following code:
//delete the row in the table that has ID of 1. This line works fine.
DataSet.Table["Start"].Rows.Find(1).Delete();
//Accept the delete changes to the table. This row returns 'object set to a
null reference' exception. Why?
DataSet.Tables["Start"].Rows.Find(1).AcceptChanges();
Why does this happen if the DataRow.Delete method page on msdn says that you
need to call DataRow.AcceptChanges() after a delete to make the rows
actually delete?
//delete the row in the table that has ID of 1. This line works fine.
DataSet.Table["Start"].Rows.Find(1).Delete();
//Accept the delete changes to the table. This row returns 'object set to a
null reference' exception. Why?
DataSet.Tables["Start"].Rows.Find(1).AcceptChanges();
Why does this happen if the DataRow.Delete method page on msdn says that you
need to call DataRow.AcceptChanges() after a delete to make the rows
actually delete?