Re: Optimistic Concurrency in a web app
- From: "Andrew Robinson" <nemoby@xxxxxxxxxxxxx>
- Date: Wed, 31 Jan 2007 20:21:30 -0800
Bruce,
I am pretty familiar with what you pointed out. My question was more about how to handle and more specifically when to store the timestamp value: from the initial server postback, after an edit control is displayed to the user or finally when the user posts back. There are three different options here. And then, how do you handle saving the timestamp across those postbacks for multiple rows in the case of a gridview.
Thanks,
"bruce barker" <nospam@xxxxxxxxxx> wrote in message news:eUxjn%23ZRHHA.4756@xxxxxxxxxxxxxxxxxxxxxxx
there are two approaches.
1) in the update compare every before value in the where clause (this is how the asp.net datasource wizards work). so if any column was changed, the update is rejected (row count == 0)
2) add a timestamp to each row, and compare on update.
-- bruce (sqlwork.com)
Andrew Robinson wrote:I am working on a system system that requires optimistic concurrency within a web app. At first I thought this would be easy. We generate our own entities and dal/service layer but I now see that working with controls like a grid view pose some very complicated issues.
If I am using rowversion, when do I start the "clock"? When I first display the label version of a field? when I display the data within a textbox for edit or when I read the record for the 3rd time before updating new values on the edit postback? And finally, where do I store rowversions for all of these records in a web app since it doesn't look like they can be stored as part of the gridview?
I am guessing that someone has wrestled with this alligator before. Any suggestions or is this something that is so plagued with problems that it I would just be better off not implementing it.
-Andy
.
- Follow-Ups:
- Re: Optimistic Concurrency in a web app
- From: Steven Cheng[MSFT]
- Re: Optimistic Concurrency in a web app
- References:
- Optimistic Concurrency in a web app
- From: Andrew Robinson
- Re: Optimistic Concurrency in a web app
- From: bruce barker
- Optimistic Concurrency in a web app
- Prev by Date: Re: Gridview Checkbox Alignment Problem
- Next by Date: fine tuning a DirectorySearcher.Filter
- Previous by thread: Re: Optimistic Concurrency in a web app
- Next by thread: Re: Optimistic Concurrency in a web app
- Index(es):
Relevant Pages
|