Commits all the changes made to this DataSet since it was loaded or since the last time was called.
Assembly: System.Data (in System.Data.dll)
Both the DataRow and DataTable classes have methods. Calling AcceptChanges at the DataTable level causes the AcceptChanges method for each DataRow to be called. Similarly, invoking on the DataSet causes AcceptChanges to be called on each table within the DataSet. In this manner, you have multiple levels at which the method can be invoked. Calling the of the DataSet enables you to invoke the method on all subordinate objects (for example, tables and rows) with one call.
When you call AcceptChanges on the DataSet, any DataRow objects still in edit-mode end their edits successfully. The RowState property of each DataRow also changes; Added and Modified rows become Unchanged, and Deleted rows are removed.
AcceptChanges and RejectChanges only apply to DataRow related changes (that is, Add, Remove, Delete, and Modify). They are not applicable to schema or structural changes.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.