Re: Mulitple users accessing same record - how to work out
- From: "Daniel Crichton" <msnews@xxxxxxxxxxxxxxxx>
- Date: Mon, 22 Jun 2009 09:17:48 +0100
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
.
- References:
- Prev by Date: Re: Mulitple users accessing same record - how to work out
- Previous by thread: Re: Mulitple users accessing same record - how to work out
- Index(es):
Relevant Pages
|