Home All Groups Group Topic Archive Search About

Concurrency violation: the UpdateCommand affected 0 of the expecte

Author
5 May 2007 8:01 AM
mkomasi
Hi
When I want to update a record folowing exception has been appeared:
Concurrency violation: the UpdateCommand affected 0 of the expected 1 records
Can anyone help me about the cause of the exception?

regards
Mehdi

Author
5 May 2007 10:31 AM
Jon Skeet [C# MVP]
mkomasi <mkom***@discussions.microsoft.com> wrote:
> When I want to update a record folowing exception has been appeared:
> Concurrency violation: the UpdateCommand affected 0 of the expected 1 records
> Can anyone help me about the cause of the exception?

An update command usually contains a "where" clause to update the right
row. In this case, it sounds like the "where" clause didn't match
anything, so it didn't update any rows.

Now, as to why that happened, we'll need more information about what
you're doing...

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet   Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too

AddThis Social Bookmark Button