1

I have a data table to update changes to DataBase table. For better understanding what I mean I posted the picture. How can solve this problem?

enter image description here

When I delete the row I call rows.Delete() method. When I click Save button on the form it will call DataAdapter.Update() method.

Raidri
  • 17,258
  • 9
  • 62
  • 65
deva
  • 123
  • 1
  • 2
  • 9
  • Hi, Concurrency violation occurs when you try to update/delete any data which is not really exists. Show me your code so that I can see the sequence of your datatable updation. – Manoj Aug 28 '13 at 12:53
  • hi as shown in above picture after i delete the row and if i call update and insert new rows and call update the code is going fine. but after i delete the row and insert new rows to that datatable and call update the concurrency violation occurs – deva Aug 29 '13 at 02:22
  • First u have check if Purchase Product Serial No is primary key or not.. If yes then you suppose to be not update it. If no then after deletion record make sure changes get saved in database and then update Purchase Product Serial No. Also u can handle this exception if u want so. For more specific answers u have to show some code which update ur DataAdaptor so than we get more idea on that. – Ankush Madankar Aug 29 '13 at 04:33

0 Answers0