I am currently developing an app in Visual Basic 2005. I am using the following code to save changes to the database.
Me
.Validate() Me.BindingSource.EndEdit() Me.TableAdapter.Update(Me.DataSet.DataTable)However, when the SaveItem_Click event is triggered a concurrency violation is reported:
System.Data.DBConcurrencyException: ConcurrencyViolation: The UpdateCommand affected 0 of the expected 1 records
The error message only appears when I attempt to apply changes to certain records - in all other cases the update method is successful.
If anyone can throw any light on the matter I would be very grateful.

Concurrency Problems
ImNoScrub
I think the first questions would be are you using Stored Procedures or the Query Builder. The error is that it thinks, the original data you are passing in is not the same as what is in the database. I would look at you update routine in the dataset and make sure your Original and is_null values are being passed in with something.
Not sure if that helped at all.
FR6
I've long noted a problem in .Net with saving, changing, saving again, throwing demonstrably spurious concurrency errors.
If you're using the command builder, there's a new property on the CommandBuilder object that causes it to build commands that only check the primary key data, not all writable values, that looks as if it's going to finally solve this:
Hope this helps.
Malcatrazz
There can also be issues with "autonumber" fields that generate numbers automatically.
Do a search on MSDN for concurrency issues. There are dozens of threads :)