| |||||
DataTable.AcceptChanges MethodSystem.Data Namespace DataTable Class Commits all the changes made to this table since the last time AcceptChanges was called. [ VB ] Public Sub AcceptChanges ( ) [ C# ] public void AcceptChanges ( ); [ C++ ] public: void AcceptChanges ( ); [ JScript ] public function AcceptChanges ( ); RemarksWhen AcceptChanges is called, any DataRow object still in edit mode successfully ends its edits. The DataRowState also changes: all Added and Modified rows become Unchanged; Deleted rows are removed. CAUTION: The AcceptChanges method should never be called on a DataTable until after you attempt to update the DataSet using the DbDataAdapter.Update method. When you invoke AcceptChanges, all rows marked as Added, Modified, or Deleted will then become marked Original. In that case, the DataSet has no way of knowing which rows must be propagated to the database management system. ExampleThe following example shows using the AcceptChanges method on a DataTable.
See AlsoDataTable Members AcceptChanges BeginEdit DataRowState EndEdit RejectChanges |
| ||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme