This was very annoying till i found out that it was due to my data which was imported into SQL Server from MS Acccess. All the primary keys were dropped and hence the Update command was failing.
- Add the approriate primary and foreign key constraints.
- You also need to change the connection string in your app.config and add MultipleActiveResultSets=True
- Also, there is one more thing you can do to fix this if problem persist. Go to the dataset designer(assuming you have typed dataset) and then right click adaptor, select configure and then select advance options. Make sure the Referesh the data table options is NOT ticked. I had this ticket and until i unticked it, the first two fixtures didn’t solve my problem.