Visual Basic .NET » Smart Device Application
Datagrid Update Concurrency Error C# -- Chirag --


I have a datagrid with a custom columns (comboboxes,date/time etc).
When I add a new record by clicking on the empty row at the bottom and update the database using GetChanges() off the dataset and than update using the dataadapter, it saves it to the database fine. But when I try to change the values of the columns and then update the row I just added I get a concurrency error.

I think it has to do with the database generating a unique key for the record once its added the first time but since I dont update the dataset with the new key, no records are matched. I tried clearing the dataset and readding all the sources and bindings and that seemed to work but I dont want to reload all the data everytime since it takes alot of time.

Any suggestions?

[Submit Comment]Home