hi,
If i use a dataset(designer created)....how do i capture the table column that cuased the optimistic concurrecy?
TY
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jorge L FernandezPosted Nov 5, 2009, 5:58 PM
Since the Optimistic Concurrency takes place when the record you want to update is not found due to a previous modification by someone else, you cannot know directly which columns were modified. The WHERE clause of the Update statement simply does not find the row. What you can do if you have a primary key is take advantage of that round trip and bring the record back to analyze in your client code what column actually changed. Note that more than one column could be changed.
This sounds like you would have to implement your own mechanism to realize what column changed. Furthermore, do you really need that or just notify the user that the record was already take by someone else.
I remember myself facing this problem but the nature of the application did not required to notify the exact values that changed.
Good look. Hope this may be usefull for you.
petre ricardoPosted Nov 5, 2009, 11:15 PM
Thanks fo the reply...., the reason i want to find out the cell that cuases the Concurrency issue is to display an error message that is more use friendly so that the user know extacly what cell cauased the error... Yes like you mentioned i could prompt the user mentioning about the Concurrency vialtion and simply have a dialog saying "do you want to view the changes or override it Y / N?" : )
I'm just trying ot be make the application user friendly : )
petre