Click to See Complete Forum and Search --> : Closing RecordSet


Jeong
September 20th, 2001, 01:22 PM
Do I close RecordSet Object(rs.close) when close connection(cn.close) at a time?
Currently, in my program, there are no problem even if don't close recordset.
If don't close recordset, does it occupy memory?
Could anyone who know it let me know?
Thank you.

I'm a senior programmer.
Working at CamSight, Dental imaging solutions industry.

ecannizzo
September 20th, 2001, 01:52 PM
Recordsets continue to take up memory until you close them and set them to nothing.

rs.close
set rs = nothing

You can close them at any time it does not have to be when you close your connection to the database. I recommend that when you're finished using the recordset that you close it.

HTH,
Erica

Cakkie
September 20th, 2001, 04:26 PM
A recordset stays in memory until it goes out of scope, then it is set to Nothing automatically. The recordset also remains open when you close the connection, but only if you have set the activeconnection property of the recordset to nothing.

Tom Cannaerts
slisse@planetinternet.be

Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook