Dis-instantiating a form object having connections
- From: "AK" <nospam@xxxxxxxxxxx>
- Date: Sun, 19 Nov 2006 08:23:20 -0600
Will dis-instantiating a form object that has an open ado connection (to
access DB), and has been instantiated by a reference to it on another form
(for example via a Debug.Print FormObject.Name statement) close the
connection that the instantiated form establishes?
More specific:
On FormA (which opens a connection ) I instantiate form global object by
using a set statement, then I unload FormA and Show FormB :
Public g_objPredecessorForm As Form
Set g_objPredecessorForm = Me
......open up an ado connection
UnloadMe
FormB.Show
Then on FormB I do a :
Debug.Print g_objPredecessorForm.Name 'This instantiates FormA with
its open connection!
Set g_objPredecessorForm = Nothing
Will the conection that was opened when FormB instantiated FormA (via the
Debug.Print on FormB), be closed by the Set g_objPredecessorForm = Nothing
statement??
AK
.
- Follow-Ups:
- Re: Dis-instantiating a form object having connections
- From: Bob Barrows [MVP]
- Re: Dis-instantiating a form object having connections
- Prev by Date: Re: Indexing of Connections
- Next by Date: Re: Indexing of Connections
- Previous by thread: Indexing of Connections
- Next by thread: Re: Dis-instantiating a form object having connections
- Index(es):
Relevant Pages
|
|