Using Global.asa
page 3 of 4
by . .
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 26997/ 42

Other stuff

Some other Stuff

You can also have objects created in a different way - with <object> tags:

<object id="objRS" RUNAT="Server" SCOPE="Session" Progid="ADODB.RecordSet"></object>

<object id="objCnt" RUNAT="server" Scope="Application" ProgID="MSWC.Counters"></object>

<script language="VBScript" RUNAT="SERVER">
...
</script>

You can also use the ClassID in the ProgID property (if known).

Some uses of this include -

  • Storing a parsed XML file in application/session variables for quick access later in the site.
  • Having an open Database connection (be careful with this one).
  • Having a recordset open on every session.
  • Put/check cookies on the user and validate them for the rest of the site.

You should be careful of storing big objects in these variables as they could get very large. eg. If each session got an ADODB.Connection object to a database and kept that throughout the visit, with increasing amounts of visitors, this could have big strains on the database and your server. Its best to store things in smaller parts, eg. Load up an xml file and filter it for the information you want, you may want to store the whole object if its not too big, or store it as an application variable.

Its better to store objects as application variables because there will only be one of them.


View Entire Article

User Comments

Title: exceeeeeeeeeeeeelent   
Name: jiji
Date: 2005-03-09 9:32:41 AM
Comment:
this was the best explanation of for some one who is a beginner and was very helpfull
thank you for saving our neck
Title: Global.asa   
Name: P.Prathiba
Date: 2005-02-19 1:02:16 AM
Comment:
This information is very useful for me.
Title: Well Done   
Name: Rizwan
Date: 2005-01-15 4:40:40 AM
Comment:
Great Help from your site.

Keep it up! This type of help are very useful for newbies and sometimes for lazy professionals. lol...
Thanks Mr. Author!
Title: Global   
Name: Raj
Date: 2005-01-12 10:28:21 AM
Comment:
This information is quiet useful.
Title: New User   
Name: Mollie...
Date: 2004-10-27 10:48:09 PM
Comment:
Thanks! Your Article helped me out....
Title: Global ASA   
Name: Tonya
Date: 2004-10-24 11:36:05 AM
Comment:
This information is GREAT. Expecially your picture on Virtural and Non-Vertual directories. I have created a small application, created a Global ASA to set a variable to current date. I then created an asp page which will display text along with the date. When I run the page in the browser, it displays my text but not the date. My question is, do I need to turn something on in order for a Global asa to execute?

Thanks for your help.
Title: hi jaan   
Name: Mehr
Date: 2004-09-12 3:42:13 AM
Comment:
i like it this way...keep going...:p
Title: Global.asa   
Name: Niranjan
Date: 2004-08-30 6:16:07 AM
Comment:
THis is very usefull artickle.I was confused with this becuse i was developing the web site without using this.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-05-08 1:48:31 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search