Updating of ADO.NET/2.0

  • Thread starter Thread starter farmer
  • Start date Start date
F

farmer

Yes we all know OleDbDataAdapter.Update(DataTable) call update
Database,but what else for DataTable.AcceptChanges()? When/why we have
to use it?
 
datatables track changes (adds, updates and deletes). unlike com ado,
datasets have no methods for reading, writing or updating databases. this is
performed by external object (like a dataadapter). thus it has no way of
knowing when your code is done with this tracking info. when you call
AcceptChanges(), it resets all the change tracking info.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top