Linq row not found or changed

Tom Gullen picture Tom Gullen · Jan 13, 2012 · Viewed 29.1k times · Source
Error Message: Row not found or changed.
Stack Trace:
at System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode) 
at System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode) 

This occurs seemingly randomly. I get emailed these errors, and the URL reported always seems to work for me and should be functioning for everyone else as well.

I can fix this error by:

  • Going to my dbml layout
  • Selecting every field in the table causing conflicts
  • Right click and set the property Update Check to Never

This seems to prevent these types of errors being thrown.

However, this is laborious to remember to keep doing whenever I make a chance to the dmbl, add new tables, etc. Is there a better way to solve this problem? I'm getting maybe 50-100 of these a day which is bad for my visitors.

Answer

Tomasz Maj picture Tomasz Maj · Jun 25, 2013

I had same issue, and solved it by comparing dbml to db structure. One property wasn't set to nullable, and that was causing the issue.

So check your dbml, and nullable properties.