[AccessD] Recordset collection
jimdettman at verizon.net
Fri Aug 20 08:50:17 CDT 2021
<< it lives on, and a subsequent open recordset "name" opens it with its
previous contents intact. Is this correct>>
You may be thinking of another product, as Access doesn't work that way.
Access/VBA does internally track open references like recordset objects, but
it's nothing you can get at.
Normally, a recordset is closed and the object variable is destroyed when
the object variable goes out of scope, although some say the Close might
does not get done if you don't explicitly do it.
So it's best to always do:
On Error Resume Next
If not rst is nothing then
Set rst = nothing
At the end of a procedure to make sure it gets done correctly.
If you don't do this, sometimes Access can hang when closing if something
is still open. One way to avoid that problem entirely is to use the Priv
DB Engine object. With that, you can in code create a new instance of the
JET Engine. Anything you do through instance won't be tracked by Access,
so if something is left hanging open, it won't stop Access from closing
(Access only looks at its own JET Engine session).
Note that you may see a re-open of a previous record set occur more quickly
if the pages needed are sitting in the page cache, but you are always
opening a new memory object and filling it.
From: AccessD On Behalf Of Arthur Fuller
Sent: Friday, August 20, 2021 8:24 AM
To: Access Developers discussion and problem solving
<accessd at databaseadvisors.com>
Subject: [AccessD] Recordset collection
As I understand it; recordsets when created are placed in a collection.
Unless an rs is closed (rs.close), it lives on, and a subsequent open
recordset "name" opens it with its previous contents intact. Is this correct
What is this collection called? What does it store exactly?
AccessD mailing list
AccessD at databaseadvisors.com
More information about the AccessD