How can you identify whether or not any changes are made to the DataSet object since it was last loaded ?

 Posted by Bharathi Cherukuri on 5/21/2012 | Category: ADO.NET Interview questions | Views: 1910 | Points: 40

The DataSet object provides the following two methods to track down the changes:

1) GetChanges() method - Returns the DataSet object, which is changed since it was loaded or since the AcceptChanges() method was executed.

2) HasChanges() method - Indicates if any changes occurred since the DataSet object was loaded or after a call to the AcceptChanges() method was made.

If you want to revert all changes since the DataSet object was loaded, use the RejectChanges() method.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response