ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Error Msg: Can't open anymore databases (https://www.excelbanter.com/excel-programming/394116-error-msg-cant-open-anymore-databases.html)

IT_roofer

Error Msg: Can't open anymore databases
 
I *thought* my code was closing the connections when it was done, but
apparently it isn't. I can't figure out why, but I was wondering if there was
a way to detect the connection state to a database... I usually use something
like this to set my database variable:

Dim db As Database

With that, I was thinking there would be a way to drop in a line like:

If db.Connection = True Then db.Close

Am I on the right track?

IT_roofer

Error Msg: Can't open anymore databases
 
?B?SVRfcm9vZmVy?= wrote in
on Wed 25 Jul
2007 08:50:02a:

I *thought* my code was closing the connections when it was done, but
apparently it isn't. I can't figure out why, but I was wondering if
there was a way to detect the connection state to a database... I
usually use something like this to set my database variable:

Dim db As Database

With that, I was thinking there would be a way to drop in a line like:

If db.Connection = True Then db.Close

Am I on the right track?


Nevermind. I just moved my db statements into an if clause and now it's
fine.


All times are GMT +1. The time now is 06:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com