views:

18

answers:

1

I have a field in my dbml file and when I try to update it, it gives me an error saying that the row or data has been changed. I read that a solution would be to change the field's update check to never, but I am unclear on what this actually means. All I have read is that Linq To Sql uses optimistic concurrency for updates and deletes, but I am unclear on what this means as well. A good example would be nice?

+1  A: 

Linq-To-Sql resolves the concurrency problem by checking the old and current value of updated field. If there is a difference, an exception will be thrown. It's impossible for some db types such as Text and Image. Thus, you have to set the UpdateCheck property to Never. Check the following article for more information.

http://blogs.msdn.com/matt/archive/2008/05/22/into-to-linq-to-sql-optimistic-concurrency.aspx

Mehdi Golchin
In my particular situation, a smalldatetime field is causing the problem.
Xaisoft