Dis-instantiating a form object having connections



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





.



Relevant Pages

  • Re: Dis-instantiating a form object having connections
    ... On FormA (which opens a connection) I instantiate form global object ... then I unload FormA and Show FormB: ...
    (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)
  • Re: Concurrent database access in SQL 2005 Mobile
    ... Please stick to having an "dummy" connection in Open State. ... So it is a kind of asynchronous commit which happens every 10 ... I am not sure of this claim as we have many applications built on SQL CE ... then opens his work forms and it's in ...
    (microsoft.public.sqlserver.ce)
  • Re: Concurrent database access in SQL 2005 Mobile
    ... Please stick to having an "dummy" connection in Open State. ... SQL CE/Mobile has a background thread that flushes the changes ... they run for long hours and we have not seen memory leaks so far. ... then opens his work forms and it's in ...
    (microsoft.public.sqlserver.ce)
  • Re: Concurrent database access in SQL 2005 Mobile
    ... opening one connection for the lifetime of the app and keeping it open seems ... What version of SQL CE are you using? ... Are you accessing the database from an app written in C++? ... then opens his work forms and it's in those ...
    (microsoft.public.sqlserver.ce)