Re: How to declare a variable in the global scope?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Miguel Dias Moura (md*REMOVE*moura_at_*NOSPAM*gmail.com)
Date: 12/15/04


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
> >>
> >



Relevant Pages

  • Re: FoxPro and DirectX9c Video Tuner control
    ... >> or script application. ... I was transforming that aplication for FP to integrate with others FP ... > It's the first post I remember seeing about FP but either here or in a FP ... Even if I make a user control OCX. ...
    (microsoft.public.win32.programmer.directx.video)
  • threads and caching of DBI-handels
    ... I use threads in a perl-script which is a Monitor for an other Aplication, so my script runs as daemon and starts threads which connect to the DB collect some data and come back. ... So I search a method where I can store my DB-handel. ...
    (perl.dbi.users)
  • how to monitoring internet traffic
    ... aplication to can generate a text file to then I can use it for a script. ... Bun I don't know what aplicaction can I use or commnad and how do it? ... Thanks a lot and sorry for my english ...
    (Ubuntu)