Re: How to declare a variable in the global scope?
From: Miguel Dias Moura (md*REMOVE*moura_at_*NOSPAM*gmail.com)
Date: 12/15/04
- Next message: Ken Cox [Microsoft MVP]: "Re: Posting one page to another (URGENT)"
- Previous message: Lowell Heddings: "Re: Connection Pooling and the data access application block"
- In reply to: Juan T. Llibre [MVP]: "Re: How to declare a variable in the global scope?"
- Next in thread: Juan T. Llibre [MVP]: "Re: How to declare a variable in the global scope?"
- Reply: Juan T. Llibre [MVP]: "Re: How to declare a variable in the global scope?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 15 Dec 2004 02:31:19 +0000
Guys,
I am even more confused than I was before...
...i am just starting.
So Aplication, Cache or Web.Config?
Maybe I should mention that I only need to access the query variable in
the same page where I have this script.
Basically this script creates the SQL code to be used on a dataset on
that page using the values passed on the URL and a list of rules.
Web.Config seems a really general solution because, if I am not wrong,
it makes available the variable to all pages.
Do you think it's a bad solution when I only need it on the same page of
the script?
About Aplication I am a little bit confused to. :-). I should place the
code you mention just before the function PAGE_LOAD.
Sorry for so many questions but I am starting ASP.NET and something seem
really obvious and easy to me but other are completely strange even if
they are simple.
Thanks,
Miguel
"Juan T. Llibre [MVP]" <nomailreplies@nowhere.com> wrote in message
news:nomailreplies@nowhere.com:
> I agree it's safe. It's just a lot slower.
>
>
>
> Juan T. Llibre
> ===========
> "Scott Allen" <bitmask@[nospam].fred.net> wrote in message
> news:96fur055dfkuj1np38rg98igktlume7eji@4ax.com...
> > Searching the underlying data structure to see if and where the key
> > exists wouldn't be an atomic operation, something could change in
> > betwen the 'find the entry' and the 'insert' or 'write' operation.
> >
> > Fortunately, the docs say the Application object is safe for
> > multi-threaded access. The Lock / Unlock would't be required for a
> > single write operation. Reflector shows it uses a slightly more
> > granular reader/writer lock underneath for thread safety:
> >
> > this._lock.AcquireWrite();
> > try
> > {
> > base.BaseSet(name, value);
> >
> > }
> > finally
> > {
> > this._lock.ReleaseWrite();
> > }
> >
> > --
> > Scott
> > http://www.OdeToCode.com/blogs/scott/
> >
> > On Tue, 14 Dec 2004 13:13:43 -0500, "John Saunders" <johnwsaundersiii
> > at hotmail.com> wrote:
> >
> >>"Juan T. Llibre [MVP]" <nomailreplies@nowhere.com> wrote in message
> >>news:uBb0Pdg4EHA.1452@TK2MSFTNGP11.phx.gbl...
> >>> Steve,
> >>>
> >>> Doesn't serializing the access to the Application object
> >>> using the Lock and UnLock methods mean you have to
> >>> accept a considerable performance hit ?
> >>
> >>Steve, why do you need to serialize writes? Updates maybe, but why
> >>simple
> >>writes?
> >>
> >>John Saunders
> >>
> >
- Next message: Ken Cox [Microsoft MVP]: "Re: Posting one page to another (URGENT)"
- Previous message: Lowell Heddings: "Re: Connection Pooling and the data access application block"
- In reply to: Juan T. Llibre [MVP]: "Re: How to declare a variable in the global scope?"
- Next in thread: Juan T. Llibre [MVP]: "Re: How to declare a variable in the global scope?"
- Reply: Juan T. Llibre [MVP]: "Re: How to declare a variable in the global scope?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|