I'm trying to get a few bits of theory straight in my head regarding ASP. I am a little confused about locking and updates. Hopefully somebody can help me understand how integrity is maintained.
Scenario
---------
Consider an ASP page that reads a record from an Access database via a standard recordset connection. The same page uses the record fields to build an html form in which the user can overtype/change the field values. The user can then hit a 'submit changes' button which will action a second ASP page to apply the the changes.
The second ASP page executes an SQL action command to update the record in the database with the new field values.
My area of confusion
--------------------
What happens if two users try and update the record with different field changes?
They both display the record details in the first page but the second user is slower than the first user hitting the 'submit changes' and hits the button after the first users update has been completed. Will both set of updates against the same record be executed? If so does this mean script programming inherently has no way of exclusive locking a record over a series of ASP pages where a user enters changes and then updates them? Even if I locked the record for the form display for exclusive access there is still a window of opportunity for a second user to get hold of the record in between the first users session form page releasing the lock to call the second page and the second page grabbing the lock again to update the record.
Question
--------
Is this just part of scripting and al you can do is limit the potential for multiple updates at almost the same time?
Many thanks
Scenario
---------
Consider an ASP page that reads a record from an Access database via a standard recordset connection. The same page uses the record fields to build an html form in which the user can overtype/change the field values. The user can then hit a 'submit changes' button which will action a second ASP page to apply the the changes.
The second ASP page executes an SQL action command to update the record in the database with the new field values.
My area of confusion
--------------------
What happens if two users try and update the record with different field changes?
They both display the record details in the first page but the second user is slower than the first user hitting the 'submit changes' and hits the button after the first users update has been completed. Will both set of updates against the same record be executed? If so does this mean script programming inherently has no way of exclusive locking a record over a series of ASP pages where a user enters changes and then updates them? Even if I locked the record for the form display for exclusive access there is still a window of opportunity for a second user to get hold of the record in between the first users session form page releasing the lock to call the second page and the second page grabbing the lock again to update the record.
Question
--------
Is this just part of scripting and al you can do is limit the potential for multiple updates at almost the same time?
Many thanks