Record Locking using web forms ?

From: Atif Ahmad Khan <aak2_at_Ra.MsState.Edu>
Date: 1996/09/11
Message-ID: <aak2.842442903_at_Isis.MsState.Edu>#1/1


Record locking using web forms ?

I have been assigned to find a solution to this problem. We are developing an application that will let employees access certain databases over the web using standard forms. Our problem is that if 2 users accessed the data using web based forms and changed it, the one that commits it last will overwrite the changes made by the other guy.

Is there a solution to this problem ? Obviously we cant lock a row using a web based form.

So far I have thought of 2 possibilities :

  1. Feed the browser all the requested information in a form *as well as* as hidden data. And when the user modifies the data have a script check the hidden data against the current data and if no data has changes then allow new data to be entered and if the data has changed then allow the user to see it and decide if they want to ovewrite it. (This can get a little complicated if we have too many forms.)
  2. Every row be assigned a serial number that is incremented by 1 everytime it is updated. Then that serial number is forwarded to the user as hidden field like in the above example. If the user wants to update it then the 2 serial numbers are compared. (This sound like a little less complicated in theory).

Is there any other solution ?

Thanks.

Atif Khan
aak2_at_ra.msstate.edu Received on Wed Sep 11 1996 - 00:00:00 CEST

Original text of this message