[AccessD] Open Recordsets when Out Of Scope?

John Colby jcolby at colbyconsulting.com
Fri Jun 20 15:49:41 CDT 2003


BTW, the error handler builder that Seth and I wrote will insert code that
finds all such objects and generate code to destroy them.  It does this in
the process of inserting error handlers in your functions so if you already
have an error handler it will not insert this code.

If you are interested in the error handler builder, go to the dba website.

http://www.databaseadvisors.com/downloads.htm

Download VBErrorHandler.

John W. Colby
www.colbyconsulting.com

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Dan Waters
Sent: Friday, June 20, 2003 4:21 PM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Open Recordsets when Out Of Scope?


Jim & Charlotte:

Thanks!

I have a little typing to do.

Dan

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust
Sent: Friday, June 20, 2003 12:50 PM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Open Recordsets when Out Of Scope?


Talk to the Microsoft Access/VBA team!  The object variable doesn't always
get reliably destroyed when it goes out of scope even though it is supposed
to, and a lot of odd behavior like not allowing the Access process to
terminate can be traced back to those undestroyed object variables.  The
object isn't still open but it hasn't disappeared entirely either. And keep
in mind that closing those objects and setting them to nothing aren't the
same thing.  It's the setting them to nothing that really destroys them.

Charlotte Foust

-----Original Message-----
From: Dan Waters [mailto:dwaters at usinternet.com]
Sent: Friday, June 20, 2003 10:26 AM
To: Database Advisors
Subject: [AccessD] Open Recordsets when Out Of Scope?


To:  Susan Harkins and Charlotte Foust

Authors of 'Preventing and recovering from database bloat' in the latest
issue of Inside MS Access.

Thanks for this article!  More stuff I didn't know. . .

But - If an recordset or querydef object variable is defined inside a
procedure how can a recordset or querydef stay open after that procedure is
out of scope?  Is this a known bug?  Happens under certain circumstances?

I had read in the ADH that all recordsets are closed when you go out of
scope, so now I don't add code to explicitly close them (except when closing
is needed inside the procedure).

Thanks,
Dan Waters


_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list