Need to close disconnected recordset?RSS

2 replies

Last post Oct 05, 2004 11:35 PM by netguy

  • Need to close disconnected recordset?

    Sep 22, 2004 08:04 PM|AlexB1318|LINK

    Working on a legacy ASP app....Do I need to close a disconnected recordset stored in session() state to avoid a memory leak? I'm currently doing set session("my_rs") = nothing I'm used to calling rs.close in VB before setting the obj ref to nothing. Does this release the memory being used?
  • Re: Need to close disconnected recordset?

    Sep 23, 2004 08:36 AM|tomkmvp|LINK

    For starters, it's a really bad practice to store ADO objects in session vars ... http://www.aspfaq.com/show.asp?id=2053 Yes, you should close all objects and set = nothing when done with them.
    Tom Kaminski (former IIS MVP 2002-2010)
    http://mvp.support.microsoft.com/
  • Re: Need to close disconnected recordset?

    Oct 05, 2004 09:36 PM|netguy|LINK

    Definetely do not store in session Object. I always do this: oRs.Close() Set oRs = Nothing
    ~ Innovative Modules @ Inspector IT
    ~ I Blog @ CTO 2.0