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

  • Home
  • SEARCH
  • 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 514085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:29:17+00:00 2026-05-13T07:29:17+00:00

In my real application, I have a VB6 DLL which is called from classic

  • 0

In my real application, I have a VB6 DLL which is called from classic ASP pages. The application calls a non-standard database.

I want to have a connection pool class which will stay alive permenantly. I set the compilation flags to keep the DLL in memory but despite that, the pool is periodically destroyed.

I’ve already tried changing the ASP session timeout and the number of threads per processor, neither work.

A previous respondent has told me ODBC can handle pool behavior for me, but that’s of no use in this project as I have to communicate with the database via some bespoke database objects.

ASP Code Snippet

<%
set obj1 = server.CreateObject("LukeTestProj.TestClass2")
obj1.TestA
% >

Application Snippet

MainFn.bas

Option Explicit  
Dim x As TerminateDetect  

Sub Main()  
LogMessage "main called"        ‘simple write to file function  
    Set x = New TerminateDetect  
End Sub

TestClass2.cls

Option Explicit

Public Sub TestA()  
    LogMessage "TestA"  
End Sub

Public Sub TestB()  
    LogMessage "TestB"  
End Sub

Private Sub Class_Initialize()  
    LogMessage "TestClass2 init"  
End Sub

Private Sub Class_Terminate()  
    LogMessage "TestClass2 terminate"  
End Sub

TerminateDetect.cls

Option Explicit

Private Sub Class_Initialize()  
LogMessage "Initialise called"  
End Sub

Private Sub Class_Terminate()  
LogMessage "Terminate called"  
End Sub

A sample log file contains

25/12/2009 18:03:07: >>> main called – 106369.578
25/12/2009 18:03:07: >>> Initialise called – 106369.578
25/12/2009 18:03:07: >>> TestClass2 init – 106369.578
25/12/2009 18:03:07: >>> TestA – 106369.578
25/12/2009 18:03:07: >>> TestClass2 terminate – 106369.578
25/12/2009 18:38:04: >>> main called – 108467.261
25/12/2009 18:38:04: >>> Initialise called – 108467.276
25/12/2009 18:38:04: >>> TestClass2 init – 108467.276
25/12/2009 18:38:04: >>> TestA – 108467.276
25/12/2009 18:38:04: >>> TestClass2 terminate – 108467.276

Note that main() is called twice, but only if there’s a very long idle period in between. The Terminate method of the TerminateDetect class is never called.

Question

What’s happening to the DLL? If this architecture won’t work, how can I build a connection pool?

  • 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-13T07:29:18+00:00Added an answer on May 13, 2026 at 7:29 am

    This is a classic testing gotcha. You will have modified the ASP Session timeout but you most likely have left the overall application pool idle timeout at 20 minutes. You need to open the application pool properties in which you application runs and extend the idle timeout.

    You probably will want to return the ASP session timeout to its original value its not the value you really intended to modify. Its not lifetime of an individual session you want to prolong its the life time of an application even though idle that you want to prolong. You might even question that in the real world.

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

Sidebar

Related Questions

I notice in several API's, that you may create a struct which is used

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.