Re: Dis-instantiating a form object having connections



I don't know. If you get no response here, you might try one of the Access
groups.

When I was doing Access development, forms were still using DAO, not ADO. I
don't really know what they are using now.

AK wrote:
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

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


.



Relevant Pages

  • Dis-instantiating a form object having connections
    ... Will dis-instantiating a form object that has an open ado connection (to ... On FormA (which opens a connection) I instantiate form global object by ... then I unload FormA and Show FormB: ...
    (microsoft.public.data.ado)
  • Re: time-to-instantiation versus time-to-connect
    ... Every SQLConnection I instantiate is based on the same connection string: ... I assume connection pooling is in full force. ... connections many times during the server processing of a page-request. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Cannot clear ADO Errors
    ... tit to Nothing and then instantiate it again. ... > I'm using an ADO.Command object to execute stored procedures: ... > The errors preexist in the Application's ActiveConnection object. ... > connection dialog, it's bound to be absolutely, 100% correct for my ...
    (microsoft.public.data.ado)
  • Re: Cannot clear ADO Errors
    ... Thanks for the suggestion, but still no dice. ... The errors preexist in the Access Project's connection object, so no matter where/how I instantiate the local object, the errors are still there. ...
    (microsoft.public.data.ado)
  • Re: time-to-instantiation versus time-to-connect
    ... runtime, each page opens a single connection, then passes that connection to ... Pool you might want to consider reducing to a single connection object. ... > Every SQLConnection I instantiate is based on the same connection string: ...
    (microsoft.public.dotnet.framework.adonet)