ASP Lock and Unlock Methods
Complete Application object reference manual
The Lock Method
The Lock method prevents other users from modifying variables in the Application object (to ensure that only one user can modify Application variables at a time).
The Unlock Method
The Unlock method allows other users to modify variables stored in the Application object (after it has been locked with the Lock method).
Syntax
Application.Lock
Application.Unlock
Example
The following example uses the Lock method to prevent more than one user from accessing the visits variable at the same time, and uses the Unlock method to unlock the object so the next user can increment the value of visits:
<%
Application.Lock
Application("visits")=Application("visits")+1
Application.Unlock
%>
This page has been visited
<%=Application("visits")%> times!
Complete Application object reference manual