question about ADO connection/recordset

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

question about ADO connection/recordset

Jochen Riekhof-6
Hi...

My impression is that when I open an ADODBConnection without assigning
it to some variable it leaves the connection open forever. Or is there
some finalization mechanism that closes it automatically (Same is for
ADODBRecordsets). I could not find any finalize method that actually
does a close. If this is not the case wouldn't this be desirable
(parallel to e.g. Streams and DBConnection)?

Ciao

...Jochen


Reply | Threaded
Open this post in threaded view
|

Re: question about ADO connection/recordset

Blair McGlashan-4
"Jochen Riekhof" <[hidden email]> wrote in message
news:[hidden email]...
> Hi...
>
> My impression is that when I open an ADODBConnection without assigning it
> to some variable it leaves the connection open forever. Or is there some
> finalization mechanism that closes it automatically (Same is for
> ADODBRecordsets). I could not find any finalize method that actually does
> a close. If this is not the case wouldn't this be desirable (parallel to
> e.g. Streams and DBConnection)?
>

They are COM objects, and will be cleaned up when the last reference is
released. This happens in a generic way for COM objects in Dolphin by
finalization. If the connection is remaining open, then it is an issue in
the underlying COM objects, or a result of connection pooling, or because
you still have a reference to some other object which is back referencing
the connection.

Regards

Blair


Reply | Threaded
Open this post in threaded view
|

Re: question about ADO connection/recordset

Jochen Riekhof-8
Hi Blair...

thank you for the info, sounds good. I did not specifically mcheck for
open connection I just did not find the finalizer code.

Ciao

...Jochen