Posted on 2009-05-19
I have a project where I am accept data to be entered by the user in to a Datagridview. When the user adds data and clicks save the changes are saved to the database without any issues. The problem comes in when the user trys to add edit an existing row in the datagrid that has already been saved.
A concurrency error is returned when trying to add or change an existing row in the datagrid after the first change has been made. I have be reading articles all over the web about this but can't seem to find a solution. I read somewhere that I should not use a command builder (which I am not) and define the insert and update commands myself (which I did). I am not sure what I need to do to resolve this my i have to find a awnser somewhere and am hoping someone can help me out.
I am using a datatable to populate the datagridview and trying to save the changes to an MSAccess database. When trying to save the changes I am updating the dataadapter as follows: