---
title: "How can you identify whether or not any changes are made to the DataSet object since it was last loaded?"  
description: "How can you identify whether or not any changes are made to the DataSet object since it was last loaded?"  
author: "Sumit Kesarwani"  
published: 2014-08-21  
updated: 2020-09-22  
canonical: https://www.mindstick.com/interview/1975/how-can-you-identify-whether-or-not-any-changes-are-made-to-the-dataset-object-since-it-was-last-loaded  
category: "ado.net"  
tags: ["ado.net"]  
reading_time: 1 minute  

---

# How can you identify whether or not any changes are made to the DataSet object since it was last loaded?

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.

## Answers

### Answer by Sumit Kesarwani

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.


---

Original Source: https://www.mindstick.com/interview/1975/how-can-you-identify-whether-or-not-any-changes-are-made-to-the-dataset-object-since-it-was-last-loaded

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
