too much memory?

Results 1 to 2 of 2

Thread: too much memory?

  1. #1
    Join Date
    Dec 1969

    Default too much memory?

    We&#039;ve been creating recordsets without first creating a connection object. When I set the rs to nothing is the implicit connection also killed from memory? <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: too much memory?

    The most important thing to remember is you must call the <BR>close method of the connection object or it wont be pooled. What that means is that if you call close it will be saved and reused by another client. Even if you set it to nothing... it wont be pooled. Must call close... Heres what I suggest doing. Use this subroutine on all your recordsets when your done with it. Dont call it after you set it nothing or the close method wont get invoked.<BR><BR>Sub CloseAndDestroy(objObject)<BR> &#039; In case object is already closed or doesnt exist<BR> On error resume next<BR> objObject.activeConnection.close<BR> set objObject.activeConnection = nothing<BR> objObject.close<BR> set objObject = nothing<BR> On error goto 0<BR>End sub<BR><BR>Also.. use getrows whenever possible. then close connection immediately. This will improve the speed greatly. And if speed improves so does memory usage. Because memory gets freed quicker.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts