Results 1 to 2 of 2

Thread: Connection.Close

  1. #1
    Join Date
    Dec 1969

    Default Connection.Close

    This is a couple of questions rather than a problem. I know that at the end of my code to connect to a database I should close the connection and set it to nothing to release the memory, i.e.<BR><BR>rs.Close<BR>set rs = nothing<BR>connection.Close<BR>set connection = nothing<BR><BR>My question are :<BR><BR>(1) Do I need to close the recordset (rs) and set it to nothing as well as the connection itself or does closing the connection do this anyway, and<BR>(2) What happens if I don&#039t close the connection and/or set it to nothing ? Does it get closed and released after a certain time period ?

  2. #2
    Join Date
    Dec 1969

    Default RE: Connection.Close

    (1) Yes, you need to close and set the recordset to nothing.<BR><BR>(2) It&#039s *supposed* to, but the garbage collection is a bit shoddy. What&#039s likely to happen is that your server will suddenly (and silently) stop responding to ASP requests after a more or less random period.<BR><BR>Dunc

Posting Permissions

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