AcceptChanges and RejectChanges
AcceptChanges and RejectChanges The AcceptChanges( ) and RejectChanges( ) methods either accept or reject the changes that have been made to the DataSet since it was last loaded from the data source or since AcceptChanges( ) was last called. The AcceptChanges( ) method commits all pending changes within the DataSet . Calling AcceptChanges( ) changes the RowState of Added and Modified rows to Unchanged . Deleted rows are removed. The Original values for the DataRow are set to the Current values. Calling the AcceptChanges( ) method has no effect on the data in the underlying data source. The AcceptChanges( ) method is implicitly called on a row when the DataAdapter successfully updates that row back to the data source when the Update( ) method is called. As a result, when a DataAdapter is used to update the data source with the changes made to the DataSet , AcceptChanges( ) doesn't need to be called. Calling AcceptChanges( ) o