System.Data.DataTable.AcceptChanges Method

Commits all the changes made to this table since the last time DataTable.AcceptChanges was called.

Syntax

public void AcceptChanges ()

Remarks

When DataTable.AcceptChanges is called, any System.Data.DataRow object still in edit mode successfully ends its edits. The System.Data.DataRowState also changes: all Added and Modified rows become Unchanged, and Deleted rows are removed.

The DataTable.AcceptChanges method is generally called on a System.Data.DataTable after you attempt to update the System.Data.DataSet using the System.Data.Common.DbDataAdapter.Update(DataSet) method.

Requirements

Namespace: System.Data
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0