Re: Optimistic Concurrency in a web app

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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

.



Relevant Pages

  • Re: Timestamping an Import
    ... Access session you can define a Global variable to store the timestamp. ... display the value each time a user runs the application. ...
    (microsoft.public.access.formscoding)
  • Database list adapter
    ... able to use a Sharepoint list to edit values that I have stored in our ... and I would a) like to be able to display this in Sharepoint as a list ... (which I think I might be able to do with the Business Data Catalog. ... and b) be able to edit each Store just as I would edit an item in a ...
    (microsoft.public.sharepoint.portalserver)
  • Re: logging time spent on my website
    ... I store the timestamp in db ok thats cool. ... Thats why I was thinking of a endless loop. ... > you now have 2 items, last length of time, and current time stamp. ...
    (comp.lang.php)
  • Re: Bringing a Timestamp into a recordset
    ... > basic query ASP page that will allow a user to copy and paste their ... > * from a table and brings back a timestamp field. ... Test the data type and omit it's display if it is binary data. ... believe rowversion data is delivered as an array of bytes. ...
    (microsoft.public.inetserver.asp.db)
  • Re: Increment an integer
    ... hold the process name and use the timestamp to extablish the chronology of ... a record identifier should be unique, ... is also important that the identifier is semantically void ... want edit permission on all sorts of fields outside their ...
    (comp.lang.apl)