Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7518071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:39:00+00:00 2026-05-30T01:39:00+00:00

Using Classic ASP, does anyone know if it is possible (or advisable) to put

  • 0

Using Classic ASP, does anyone know if it is possible (or advisable) to put an array of dictionary objects into an Application Object? I tried but after about 50,000 or so hits to the script below the App Pool gets corrupted or something and “trappable” C0000005 errors get generated when this line is run: dictLanguage=Application(“lang”)

Works fine for a few days though. Is it something to do with the way I’ve assigned the application object to another variable, I thought it would pass a pointer not a copy? Anyone smarter than me know what’s going on here?

if isempty(Application("lang")) then 
    ''# called when first visitor hits the page (following server reboot or app pool recycle)
    init()
    dictLanguage=Application("lang")
else
    ''# called for all other page hits
    dictLanguage=Application("lang") ''# ***** TRAPPABLE ERROR after a few thousand page views *******
end if


''# // fill the application object with an array containing 10 dictionary objects, each holding a different language.
''# // This function appears to run just fine.

function init

    Set initcn = Server.CreateObject("ADODB.Connection")
    initcn.Open dbConStr
    strSQL = "SELECT languageNo,quickRef,text FROM tblTranslation"
    Set rs = initcn.Execute(strSQL) 

    dim d(10)   

    Set d(1)=Server.CreateObject("Scripting.Dictionary")
    Set d(2)=Server.CreateObject("Scripting.Dictionary")
    Set d(3)=Server.CreateObject("Scripting.Dictionary")
    Set d(4)=Server.CreateObject("Scripting.Dictionary")
    Set d(5)=Server.CreateObject("Scripting.Dictionary")
    Set d(6)=Server.CreateObject("Scripting.Dictionary")
    Set d(7)=Server.CreateObject("Scripting.Dictionary")
    Set d(8)=Server.CreateObject("Scripting.Dictionary")
    Set d(9)=Server.CreateObject("Scripting.Dictionary")
    Set d(10)=Server.CreateObject("Scripting.Dictionary")

    while not rs.eof
        a=rs("languageNo")
        b=rs("quickRef")
        c=rs("text")
        ''# on error resume next
        d(a).Add b,c    
        rs.movenext
    wend

    initcn.close

    ''# Storing the array in the Application object
    Application.Lock
    Application("lang") = d
    Application.Unlock

end function
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T01:39:02+00:00Added an answer on May 30, 2026 at 1:39 am

    You should not use Dictionary objects as application-level variables due to their threading model. If you need to use a Dictionary-like object in the application-level use the free Lookup Component from Microsoft (or a free Dictionary Component from Caprock Consulting).

    To learn more, please visit this url.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone knows how to get microsecond value in VBScript (Classic ASP) without using
I'm using visual studio 2008 for a classic asp application. Will I be able
I'm creating a GUID for use in a Classic ASP application, by using TypeLib.
We're still using old Classic ASP and want to log whenever a user does
I have an ASP Classic application which references some VB6 COM OBJECTS. One of
There are two collections in the Application object in Classic ASP: Application.StaticObjects , filled
Situation: Classic ASP application, using a custom Application Pool. Default settings. On some IIS7
I have been using CDOSys object for email sending in Classic ASP and it's
I'm using classic ASP in my project. I want to merge two XMLs together.
I'm using classic asp, I have a drop down list that the user selects

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.