ASP
  Home arrow ASP arrow Page 4 - Introduction To The GLOBAL.ASA For ASP Pro...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP

Introduction To The GLOBAL.ASA For ASP Programmers
By: Rich Smith
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 51
    2003-07-16

    Table of Contents:
  • Introduction To The GLOBAL.ASA For ASP Programmers
  • Inside the GLOBAL.ASA File
  • Application and Session Objects
  • Type libraries for COM

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Introduction To The GLOBAL.ASA For ASP Programmers - Type libraries for COM


    (Page 4 of 4 )

    The last use for the GLOBAL.ASA I would like to touch on, is the ability to specify Type libraries. This functionality was first introduced in IIS5, and is not available on earlier versions. It allows you to specify, using the <metadata> tag, a type library to bind to your ASP applications. This enables you to use the constants specified within the COM object that the type library references. An example of such follows:

     <!-- METADATA NAME="Microsoft ActiveX Data Objects 2.5 Library"
    TYPE="TypeLib" UUID="{00000205-0000-0010-8000-00AA006D2EA4}" -->



    The above example would bind the Microsoft ADO 2.5 type library to your ASP application. This would enable you to use any of the constants referenced in the COM object, as follows:

     <%
    rstTest.Open strSQLcnnTestADODB.adOpenStatic_
        ADODB
    .adLockReadOnlyADODB.adCmdText
    %>



    In the above example, adOpenStatic, adLockReadOnly, and adCmdText are all constants used to describe states within the ADODB object. By referencing the type library these constants became available to all ASP pages. Alternately, an include file containing the constants could be included in all of your ASP pages, but this solution is more elegant and complete.

    In have illustrated basic usage of the functionality available within the GLOBAL.ASA file. My examples only contained very basic concepts for ease of illustration, but you can do very complex logic within the GLOBAL.ASA, if the need arise. It is my belief that with the knowledge contained within this article you should be well equipped to begin using the GLOBAL.ASA file to compliment your current and future ASP applications.

    About the author:
    Rich Smith owns and operates Jamsoft Development, a programming firm who specializes in custom systems for small businesses.
    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

     

    ASP ARTICLES

    - Using MySQL with ASP
    - ADO for the Beginner
    - ADO.NET 101: Data Rendering with a DataGrid ...
    - Introducing SoftArtisans OfficeWriter 3.0 En...
    - Getting Remote Files With ASP
    - The Real Basics of Functions in ASP
    - Enhancing Readability with ASP
    - Mimicking PHP's String Formatting Functions
    - Windows Server Hacks 12, 77, and 98
    - How to Sort a Multi-Dimensional Array
    - Developing an Information Management Tool wi...
    - What are Active Server Pages?
    - Getting Remote Pages with ASP
    - FTP’ing Files with ASP
    - Apply Single-Sign-On to Your Application





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
    Stay green...Green IT