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

Posted on    August-21-2014 11:38 PM

 ADO.Net ADO.Net 
 1 Answer(s)
  1578  View(s)
Rate this:

Sumit Kesarwani

Total Post:782

Posted on    August-21-2014 12:00 AM

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

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

The 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.

Don't want to miss updates? Please click the below button!

Follow MindStick