[dba-VB] Close DB Connection

ACTEBS actebs at actebs.com.au
Tue Nov 30 07:06:52 CST 2010


Hi Everyone,

 

I've got this issue with my app where the app keeps it's connection to the
Access DB open even after the application has finished it's task. I can't
figure out for the life of me where I've missed closing it in the various
Functions and Sub Routines.

 

I've ensured that cn.Close and cn = Nothing, has been included in all the
code where the DB is opened. The only place I can't include cn = Nothing is
when the connection is encapsulated within a Using Statement where for some
reason this is not allowed. Could this be the problem? If so, how can I
release the connection?

 

Also, is there any way of finding out which bit of code is keeping the
connection open?

 

Many Thanks

 

Vlad

 

 






More information about the dba-VB mailing list