In ADO.NET, what is the purpose of the AcceptChanges and RejectChanges methods in the DataRow?

  • AcceptChanges commits changes to the DataRow
  • AcceptChanges discards changes made to the DataRow
  • RejectChanges commits changes to the DataRow
  • RejectChanges discards changes made to the DataRow
The AcceptChanges method in DataRow commits changes made to the DataRow, effectively updating the DataRow's state to reflect the modifications. On the other hand, the RejectChanges method discards any changes made to the DataRow since it was last updated, reverting it to its original state. These methods are crucial for managing the state of DataRow objects within a DataTable.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *