DataSet.GetChanges Method

Definition

Gets a copy of the DataSet containing all changes made to it since it was last loaded, or since AcceptChanges() was called.

Overloads

Name Description
GetChanges()

Gets a copy of the DataSet that contains all changes made to it since it was loaded or since AcceptChanges() was last called.

GetChanges(DataRowState)

Gets a copy of the DataSet containing all changes made to it since it was last loaded, or since AcceptChanges() was called, filtered by DataRowState.

GetChanges()

Source:
DataSet.cs
Source:
DataSet.cs
Source:
DataSet.cs
Source:
DataSet.cs
Source:
DataSet.cs

Gets a copy of the DataSet that contains all changes made to it since it was loaded or since AcceptChanges() was last called.

public:
 System::Data::DataSet ^ GetChanges();
public System.Data.DataSet? GetChanges();
public System.Data.DataSet GetChanges();
member this.GetChanges : unit -> System.Data.DataSet
Public Function GetChanges () As DataSet

Returns

A copy of the changes from this DataSet that can have actions performed on it and later be merged back in using Merge(DataSet). If no changed rows are found, the method returns null.

Examples

The following example creates a simple DataSet with one table, two columns, and ten rows. Two values are changed, and one row is added. A subset of the changed data is created using the