Mar 17, 2000, 6:30 PM
Veteran / Moderator (6956 posts)
Mar 17, 2000, 6:30 PM
Post #4 of 7
I guess I mis-read the question.
There is "record level" locking, meaning no two people can modify the same link at the same time, and more than 1 person can make changes to the database at one time.
I guess I read it as:
If Jane does a search to modify 10 records with a keyword of "Grass", which includes (for example) Link ID #222, and then Roger does a search to modify record #222 there is no way for the database to keep track of that.
The two changes can overwrite each other.
Example -- Jane's request is at 2:30 and Roger's is at 2:31 Both get the same copy of the record.
Roger saves his change back to the database at 2:32, but jane, who is modifying 10 records, takes 10 minutes to make the changes, and she doesn't save the changes back until 2:40. Her changes of record 222 will overwrite Rogers, because the Admin made a "select" request, and populated a form, it didn't put a "hold" or a "lock" on the records that were being returned.
When the "update" button is pressed, the form sends an "update" request to the database, but it assumes that any data in the new fiels overwrites the old data, so no check is made that the data has not changed since it was last accessed.
You could get around this using a "timestamp" variable, or a "datetime" variable that is updated whenever the record is modified.
If the hits are _not_ being written to the main Links table, a plain "timestamp" field would work... if they are, you'd have to define a new field such as "admin_edit" as a "datetime" and update it with the time the update was made. You'd need to check for that BEFORE updating the record, and if it's later than the one you have, you need a way to save the new edits, show the changes, and let them be overridden or not. It's really, really, really bad form and incredibly aggrevating to find all the changes you made thrown away and lost because the database updated the hits/ratings values and you've made significant changes to the Descriptions.
That's what I visualized by "lock" as opposed to multi-user access.
I could be wrong in the above -- but I've been able to make simultaneous changes to the database from different browser windows, without any "record locked" messages, so I'm assuming that what I see in the code (and explain above) is how it works.