Quick question about Application.Lock()...
When you lock the application, does it still allow read access, or does it
deny read as well as write?
thanks in advance,
- Aaron. 4 2037
Hi,
The Lock method blocks other clients from modifying the
variables stored in the Application object, ensuring that
only one client at a time can alter or access the
Application variables.
regards
Sreejumon[MVP] www.mstechzone.com-----Original Message----- Quick question about Application.Lock()...
When you lock the application, does it still allow read
access, or does itdeny read as well as write?
thanks in advance,
- Aaron.
.
It still allows read access while it is locked. The lock only applies to
writing data to the application object.
I'm pretty sure the reads will continue to get the old application value
until you unlock.
--
I hope this helps,
Steve C. Orr, MCSD http://Steve.Orr.net
Developer for Hire
"Eidolon" <aa****@yahoo.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl... Quick question about Application.Lock()...
When you lock the application, does it still allow read access, or does it deny read as well as write?
thanks in advance,
- Aaron.
Sreejumon is a smart guy and made me doubt myself on this one. So I looked
it up on the Internet and I still can't say I'm sure one way or another. I
saw a couple web sites that agreed with what Sreejumon pasted, then I also
saw some sites that did not. And I saw others that weren't specific about
that detail.
Here's more info: http://www.devguru.com/Technologies/...tion_lock.html http://webcoder.info/reference/Application.Lock.html http://www.piclist.com/techref/langu...vbom_apoml.htm
Has anybody personally tested this situation to be sure?
--
I hope this helps,
Steve C. Orr, MCSD http://Steve.Orr.net
Developer for Hire
"Steve C. Orr, MCSD" <St***@Orr.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... It still allows read access while it is locked. The lock only applies to writing data to the application object. I'm pretty sure the reads will continue to get the old application value until you unlock.
-- I hope this helps, Steve C. Orr, MCSD http://Steve.Orr.net Developer for Hire
"Eidolon" <aa****@yahoo.com> wrote in message news:%2***************@TK2MSFTNGP10.phx.gbl... Quick question about Application.Lock()...
When you lock the application, does it still allow read access, or does
it deny read as well as write?
thanks in advance,
- Aaron.
Steve,
I just tested it like this:
If Not IsPostBack Then
'---First page load only
Application("Test") = 1
Response.Write(Application("Test").ToString)
Else
'---Post back only
Application.Lock()
Application("Test") = 2
Response.Write(Application("Test").ToString)
End If
The application object is still readable (of course) and on post back it
returned as: 2
Sincerely,
--
S. Justin Gengo, MCP
Web Developer
Free code library at: www.aboutfortunate.com
"Out of chaos comes order."
Nietzche
"Steve C. Orr, MCSD" <St***@Orr.net> wrote in message
news:Ou**************@TK2MSFTNGP10.phx.gbl... Sreejumon is a smart guy and made me doubt myself on this one. So I
looked it up on the Internet and I still can't say I'm sure one way or another.
I saw a couple web sites that agreed with what Sreejumon pasted, then I also saw some sites that did not. And I saw others that weren't specific about that detail. Here's more info: http://www.devguru.com/Technologies/...tion_lock.html http://webcoder.info/reference/Application.Lock.html http://www.piclist.com/techref/langu...vbom_apoml.htm
Has anybody personally tested this situation to be sure?
-- I hope this helps, Steve C. Orr, MCSD http://Steve.Orr.net Developer for Hire
"Steve C. Orr, MCSD" <St***@Orr.net> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... It still allows read access while it is locked. The lock only applies
to writing data to the application object. I'm pretty sure the reads will continue to get the old application value until you unlock.
-- I hope this helps, Steve C. Orr, MCSD http://Steve.Orr.net Developer for Hire
"Eidolon" <aa****@yahoo.com> wrote in message news:%2***************@TK2MSFTNGP10.phx.gbl... Quick question about Application.Lock()...
When you lock the application, does it still allow read access, or
does it deny read as well as write?
thanks in advance,
- Aaron.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Google Mike |
last post by:
I need an Application object replacement. I was creating my own using
shared memory -- shm* API in PHP. I was doing fine for 6 months until
it just got too fat, I guess, and the RH9 Linux server...
|
by: Roy Padgett |
last post by:
I have a combo box where users select the customer name and can either
go to the customer's info or open a list of the customer's orders.
The RowSource for the combo box was a simple pass-through...
|
by: Fernando Rodríguez |
last post by:
Hi,
I've been reading the multithreading tutorial at
http://www.yoda.arachsys.com/csharp/threads/locking.shtml (thanks Jon :-) and
there's one thing I don't understand.
Why do have to pass a...
|
by: Gaensh |
last post by:
HI,
I have a singleton pattern to acess my database the following is
the sample code use to implement singleton pattern
public class DataAccessHelper
{
private static DataAccessHelper instance;...
|
by: Bobby C. |
last post by:
My company is in the process of getting ready (well actually QTR 2 2004) to
roll out a rewritten version of a vertical market application for the
municipal market (small and medium sized cities). ...
| |
by: John Cosmas |
last post by:
I need to execute some threads that load items into my APPLICATION object. I
haven't figured out how to do that when I fire off a thread on a page, that
takes its time and loads data into the...
|
by: roadrunner |
last post by:
Hi,
Our website has recently been experiencing some problems under load. We have
pinpointed a particular function which slows dramatically when we have these
problems. Normally it should execute...
|
by: snowbunny |
last post by:
Hi,
I'm having a problem with releasing a file lock after a save. My code takes an image file uploaded via a form, and saves it to disk. That's fine, but I'm trying to add a new function which...
|
by: Dave |
last post by:
I have a global.asax file with Application_Start defined and create some
static data there and in another module used in the asp.net application and
I realize that static data is shared amongst...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |