Re: Mulitple users accessing same record - how to work out

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




Joe wrote on Thu, 18 Jun 2009 05:22:25 -0700 (PDT):

I am building an application using classic ASP that may be used by
multiple users at a time. What are the methods for working this out?

For example, if User A opens the application and selects a record, they
can be working on the record as it existed when they opened it.
But if User B was to open the application, select the same record as
was opened by User A and edits and submits the form, then User A is not
aware of the changes made.

Thanks,
Drew

You could create a checksum of the original data and store this as a hidden
field in the form so when the user posts the changes back it compares the
checksum with the data in the database and if they don't match then you know
something else has edited it during the time the user had it open. What you
do then is where it could get tricky - the simple solution would be just to
tell the user that the changes could not be made because another user has
edited the data and send the new data back to the user along with the new
checksum which would then allow them to make any further changes and try
posting again. Any method that would involved merging or determining if the
current user should have their changes override the other user will be a lot
more complex to handle.

--
Dan


.



Relevant Pages

  • Re: Checksums and file sizes
    ... >> usually look at the output and manually decide what to fix. ... >> Do you want to fix the checksum list or the files? ... `custom -V strict` compares your system's _modified_ files to the ... `custom -V thorough` is the command you're looking for. ...
    (comp.unix.sco.misc)
  • Re: cp with verify?
    ... Michael Tosch wrote: ... checksum differed it would rewrite the block (at least I believe it ... end-users to do a "verify" on the file or batches of files copied. ... cmp compares two files. ...
    (comp.unix.admin)
  • Re: amd64 sata_nv (massive) memory corruption
    ... new device mapper module computes a checksum and stores ... compares to the stored value. ... I assume that a device mapper can alter the number ... the encrypting dm has to store meta-information ...
    (Linux-Kernel)
  • Re: Does OTP need authentication?
    ... >>that is to be encrypted with OTP. ... Then recipient decrypts the message, ... >>calculates the checksum and compares it to the checksum that came inside ...
    (sci.crypt)