Concurrency violation: the UpdateCommand affected 0 of the expected 1 records. Visual C# 2010

前端 未结 5 1830
走了就别回头了
走了就别回头了 2021-01-14 15:46

i\'m sorry. i wouldn\'t post this if i weren\'t out of ideas. i\'ve tried everything in the forums, but to no avail.

so i have 2 tables. both are empty at the beginn

5条回答
  •  长情又很酷
    2021-01-14 16:16

    This error is mostly because of updating multiple changes to database without reloading updated data between requests and when you try to save(Update) stacked changes this error may occur.

    For more info check this answer by Henk which was very helpful for me.


    And here there is a good example in details.

提交回复
热议问题