June 2002
Intermediate to advanced
816 pages
28h 12m
English
Lock
Application.Lock
Locks access to an Application collection to facilitate access synchronization.
None
The example locks the application, sets an application page load counter variable, unlocks the application, and displays the value:
Sub Page_Load( )
Application.Lock( )
Application("Counter") = Application("Counter") + 1
Application.UnLock( )
Message.Text = "Counter = " & Application("Counter")
End SubIn the example, note that we Lock the application, perform any operations that modify values within the Application collection, and UnLock the application as quickly as possible. Any read access to the Application collection can safely take place outside the Lock/UnLock method calls.
Read now
Unlock full access