How can you identify whether or not any changes are made to the DataSet object since it was last loaded?
349521-Aug-2014
Home / DeveloperSection / Interviews / How can you identify whether or not any changes are made to the DataSet object since it was last loaded?
Sumit Kesarwani
21-Aug-2014The 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.