Closing Recordsets and Conxion Objects

Results 1 to 5 of 5

Thread: Closing Recordsets and Conxion Objects

  1. #1
    KYOKO Guest

    Default Closing Recordsets and Conxion Objects

    I am conufsed about closing recordsets and connecton objects.<BR><BR>Do I absolutely need to close either or both?<BR><BR>Along the same lines, do I need a connection object (set rs=server.createobject("adodb.recordset") ) for each recordset created by a query, or will one connection object handle multiple recordsets?<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Closing Recordsets and Conxion Objects

    You do not &#039absolutely need to&#039, but you &#039absolutely should&#039. It&#039s good programming, and keeping it as a habit will help you avoid difficult-to-reproduce bugs. Also, in some instances (that have to do with connection pooling), closing a connection and setting it to nothing will dramatically improve performance.<BR><BR>Do it, live it, breathe it.<BR><BR>As for your second question, one connection can be used for unlimited recordsets.

  3. #3
    Kyoko Guest

    Default Will it hurt perfomance to use Mulitple RS Objects

    Does it hurt performance to use one recordset per connection object?<BR><BR>

  4. #4
    Kyoko Guest

    Default I meant multiple CONNECTION Objects


  5. #5
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: I meant multiple CONNECTION Objects

    WHY would you NEED multiple CONNECTION Objects??<BR><BR>Are you querying from more than one DB. DONT open more than one connection object UNLESS you are going to connect to more than one DB/Server. <BR><BR>If you HAVE TO i would suggest you close one and THEN open the other

Posting Permissions

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