Using AcceptChanges with SQL Server

I am confused about the effect of using AcceptChanges in a dataset. It can be seen from my tests that this causes database changes to be made, regardless of any database restrictions.

Can someone confirm if this is so, or if not, how is this different from using the update function in a dataset?

+3
source share
1 answer

AcceptChanges does not affect your database, it only affects the DataSet (your copy of the data in memory).

Using AcceptChanges will cause all Datarows of all tables in the dataset to have a Rowstate reset in RowState.Unchanged.

AcceptChanges DataTable.GetChanges. DbDataAdapter.Update. , , AcceptChanges, DataSet, .

+7

Source: https://habr.com/ru/post/1717238/


All Articles