G
Guest
I have a DataGridView bound to a TableAdapter with which I am updating data
using optimistic concurrency. When I insert a new row, or update an exsting
row, the TableAdapter doesn't get refreshed even though the final line in the
stored procedures are select statements that return the modified row.
Everything that I have found indicates the select statement should trigger
the refresh, but it the refresh does not occur and subsequent edits or
deletions to the row fail.
The failure to refresh the data is not just an issue with the application
that I am attempting writing. At first I thought it might be happening
because a timestamp column is used for concurrency, but that doesn't appear
to be the issue. I tried the C# example code from the multiple table
walkthrough at http://msdn2.microsoft.com/en-us/library/4esb49b4.aspx and the
same thing happens. The first update works, but subsequent updates to the
same row fail because the TableAdapter does not get refreshed. This was not
apparent when I first ran the application, so I deleted the row I added and
tried again. After the save, the order showed the same ID value that was
generated by the client when adding it to the DataGridView. The correct id
was not displayed until I exiting and restarted the application.
using optimistic concurrency. When I insert a new row, or update an exsting
row, the TableAdapter doesn't get refreshed even though the final line in the
stored procedures are select statements that return the modified row.
Everything that I have found indicates the select statement should trigger
the refresh, but it the refresh does not occur and subsequent edits or
deletions to the row fail.
The failure to refresh the data is not just an issue with the application
that I am attempting writing. At first I thought it might be happening
because a timestamp column is used for concurrency, but that doesn't appear
to be the issue. I tried the C# example code from the multiple table
walkthrough at http://msdn2.microsoft.com/en-us/library/4esb49b4.aspx and the
same thing happens. The first update works, but subsequent updates to the
same row fail because the TableAdapter does not get refreshed. This was not
apparent when I first ran the application, so I deleted the row I added and
tried again. After the save, the order showed the same ID value that was
generated by the client when adding it to the DataGridView. The correct id
was not displayed until I exiting and restarted the application.