Saturday, August 3, 2013

Concurrency violation: the UpdateCommand affected 0 of the expected 1 records

Hi Ryan,


That error means that the record you're trying to update in the database doesn't exist in the database. There could be several reasons for that. Take a look at is what the TableAdapter's UpdateCommand looks like at runtime. Try putting a breakpoint in your TableAdapter code to look at the command and the parameters. Perhaps your DataTable doesn't have the PrimaryKey of the row that you're trying to update?




~~Bonnie Berent DeWitt [C# MVP]


http://geek-goddess-bonnie.blogspot.com


No comments:

Post a Comment