Classic ASP global.asa not passing application variable

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Madhusudana Babu
    New Member
    • Mar 2008
    • 3

    Classic ASP global.asa not passing application variable

    IMy classic ASP app has a global.asa file in the root directory of the app 'SDT'.
    I have set an application variable there:
    <SCRIPT LANGUAGE=VBScri pt RUNAT=Server>

    Sub Application_OnS tart
    Application("st rEnv")= "Prod"
    End Sub
    </SCRIPT>
    In an include page I try to retrieve the variable to detrmine data connections to be used:
    Dim strApp
    strApp = Application("st rEnv")

    SELECT CASE strApp
    Case "Dev"
    <code>
    Case "QA"
    <code>
    Case "Prod"
    <code>
    END SELECT

    The problem is that the variable strApp is never populated.
    What have I done wrong?
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    You can declare application variables in any asp page, I do it all the time. Is there any asp page in which you can define strEnv?

    Jared

    Comment

    Working...