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 8811055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:16:06+00:00 2026-06-14T03:16:06+00:00

SO, I learned that in old school ASP Classic if you use the <object

  • 0

SO, I learned that in old school ASP Classic if you use the

<object runat="server" id="somename" progid="ADODB.Recordset"></object>

tag it provides a performance improvement over using

set rs = Server.CreateObject("ADODB.Recordset")

However, all was lost when I tried to execute. set rs = nothing Is this the intended behavior? does that tag make asp handle disposing of object better?

  • 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-06-14T03:16:08+00:00Added an answer on June 14, 2026 at 3:16 am

    If you are including this object declaration directly in your asp page (not global.asax) then it terminates itself once the page request ends.

    You can also include these in your global.asa file if you want them to persist over the session or application scope.

    <OBJECT ID=rsCustomers PROGID="ADODB.Recordset" RUNAT="Server" SCOPE="Application"></OBJECT>
    

    Note the SCOPE attribute. This loads the recordset into an application variable (can be set to either “session” or “application” depending on your use case). You can easily destroy session variables in your scripts like this:

    Session.Abandon

    Or if you want to kill the session variable but leave the session open, just terminate the session variable like this:

    Set Session("rsCustomers") = Null

    If you just want the RS object for the page, then leave out the scope attribute, and include the object declaration in the page itself.

    The id will be available as a regular variable as though you declared it in a vbscript codeblock directly in the page. Just remember to do a .close to close the object, and the object will terminate on its own as soon as the page load is complete (e.g. when the page scope is complete).

    Hope this helps.

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

Sidebar

Related Questions

First, I'm not a python programmer. I'm an old C dog that's learned new
I learned that when executing commands in Python, I should use subprocess. What I'm
I use this syntax to open my files, since I learned that some years
From an old answer I have recently learned that Google Analytics, besides the traditional
I've learned that in dealloc you do [object release]; but in viewDidUnload (in a
I learned that repaint() wasn't an actual method that repaints the screen. Rather, it
I learned that Xcode can compile c code, that means can we write whole
I recently learned that table valued functions are not allowed with Entity Framework 4.1.
I've learned that MySQL can compress communication between servers and clients. Compression is used
I recently learned that all stl containers have swap function: i.e. c1.swap(c2); will lead

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.