Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error "Can't Open Any More Tables" VB.Net with Access DB

Status
Not open for further replies.

masteelbill

Programmer
Sep 24, 2009
3
US
I have an application that was developed by a professor and installed on several PC's at work. It runs fine on 2 Windows XP PC's but I encounter the "Can't Open Any More Tables" error on my PC with nothing else running. Everything seems to point to the Microsoft Jet Engine but I am running Jet.OLEDB.4.0 so I have the latest version. However, I also build Delphi applications and use ODBC to connect to our business DB. Is there any way to find out why I get the error only on my PC but not on other PC's?
Any ideas would be appreciated.
Thanks,
 
Does the error always occur with others connected to the database, or are you absolutely the only one connected when getting the error?

What I'm thinking is that different table connections are being set on this presumably back-end when each person connects. Also, it's possible that some ODBC connections are being left connected when not needed, rather than being released.

--

"If to err is human, then I must be some kind of human!" -Me
 
Also, it's possible that some ODBC connections are being left connected when not needed, rather than being released.

My thought exactly.

Cogito eggo sum – I think, therefore I am a waffle.
 
I am the only user on this PC and only 1 person (me) is ever connected to the Access DB. It is possible there are other ODBC connections that remain connected to our business DB. Is there a way for me to determine if there are open connections and what is the best approach to close them?

Thanks for the help!
 
I suppose the best method would actually be to look through your code, and look for anywhere that you set the connections, and make sure for every time you set/open a connection, that you also close the same connection.

--

"If to err is human, then I must be some kind of human!" -Me
 
For instance, if you've got a setup something like this in your code:

Code:
Private Sub CuriousGeorge()
  Dim cn as ADODB.Connection
  Set cn = .....
  cn.Open

With cn
     [green]'...do stuff...[/green]
End With

[green]'Then you also need to run this code if not there[/green]

  cn.Close
  Set cn = Nothing
End Sub

Also, another thing I just thought of - you said you're the only one to access this database. Another possibility, basically on top of the connections being left open, is that if you aren't restarting your PC on a fairly regular basis - once a day, once a week, something - then it's also possible that these loose connections are adding up over time, sitting in memory. So a fresh reboot of the PC could be a temporary fix while you try to get all the code sorted out.

--

"If to err is human, then I must be some kind of human!" -Me
 
Thanks for the suggestions. I don't have source code and I have rebooted and shut down processes without any change. I must have something running on my PC that is consuming connections but I can't find it. I have installed the application on another PC that I can hotkey to access. So the problem is not creating a problem. I just wanted to see if I could find what was causing the additional connections.

Again thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top