Mr. Google is not being of any help on this subject.
I'm building a multi-user app, and need to consider record concurrency. The question: When the DataAdapter.Update throws a DBConcurrencyException, how do I commit the changes that were made?
Normally you wouldn't because that would make the changes made by another user to be overwritten and I don't think that is a good idea.
But if you want to do it anyway.
First I would ask if he wants to overwrite the changes made by the other user then I would copy that record into another dataset/datatable, refill the original one recopy the data from the second dataset and update to the database.
Another option would be to tell the user there was a concurrency problem, show him the new data and make him do the changes again if he still wants to.
1) I think that he won't update any of the rows that have been changed. so you would be save to copy all the records you got (or just the changed ones). in th catch section.
2) yep
3) I wouldn't merge just dataset.copy or .clone or something to that effect.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.