What happens when you apply RejectChanges method on a DataSet?

 Posted by Tripati_tutu on 11/22/2010 | Category: ADO.NET Interview questions | Views: 3742 | Points: 40

Let's consider, a DataSet contains 3 tables. When you will apply RejectChanges() method, it will be automatically invoked on all the 3 tables in the dataset. So any changes that were done with the tables will be rolled back.

When you call DataTable.RejectChanges method, the rows that are in edit-mode will cancel their edit. It will remove the new added rows. It will also return back all modified and deleted rows to its original state.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response