none
Cannot open any more databases. (Error 3048) Is there a way to see whats open (maybe hidden) RRS feed

  • Question

  • Hi

    I am running Access 2013.
    Getting the message "Cannot open any more databases (Error 3048)"

    But "nothing" is open. I had some reports open in preview but they are closed.
    Then when I try to open another report (Invoice) the "Cannot open any more databases" appears.

    If I close the whole database and then open the Invoice again, there is no problems or errors.

    Is there a way to see whats open?
    What can be done?


    Best // Peter Forss Stockholm and Sigtuna GMT +1.00

    Monday, September 7, 2015 2:10 PM

Answers

  • Let me add a point that my experience has found; which is that it can be a 'straw that breaks the camel's back' scenario : in that it is not uniquely the cause of 1 process (i.e. opening a report) by itself but rather the total combination of the database actively open.

    In that case I could identify reports that definitely could/should be closed when/if a new report was open - and by auto closing those first upon open of the new report - everything works fine.

    Also, when I have found 1 specific cause - it typically is due to an extremely complex query - possibly designed incorrectly (circular).  If designed correctly I changed the method to write some data to a temp scratch table - so that the entire query did not have to fire.

    just ideas that may help......

    • Marked as answer by ForssPeterNova Tuesday, September 8, 2015 7:23 PM
    Tuesday, September 8, 2015 2:02 PM

All replies

  • Hi. Assuming you have a split configuration, that error usually indicates multiple connections to the BE at the same time. The most common cause of it is having a busy form with a lot of subforms and comboboxes or listboxes that have SQL statements as record source. Does your report have any subreports or comboboxes on it?
    Monday, September 7, 2015 2:28 PM
  • Yes its a FE BE database.

    Two forms are open. results of queries in snapview.
    (The same Forms open both when "it" works and when its not and the "Cannot open more databases" is shown.)

    My Report have several subreports, but no comboxes.

    Number of subreports - 9

    I have now found what causes the "Cannot open more databases"  . Its this code:

    DoCmd.OpenReport "Packing slip", acViewPreview, "", "", acNormal

    So if I open the "Packing slip" and then close it, then I cant open the Invoice.
    If I go directly to the Invoice there's no "Cannot open more databases" 


    Best // Peter Forss Stockholm and Sigtuna GMT +1.00

    Monday, September 7, 2015 2:54 PM
  • Hi Peter. Glad to hear you found the source of the problem. As you open more objects in Access, it could in turn open more connections than you realize until you get the error that Access reached the maximum connections allowed. Good luck with your project.

    Monday, September 7, 2015 3:01 PM
  • DB guy.

    But when I close a report. Shouldn't all connection it used be released? 


    Best // Peter Forss Stockholm and Sigtuna GMT +1.00

    Monday, September 7, 2015 3:08 PM
  • DB guy.

    But when I close a report. Shouldn't all connection it used be released? 


    Best // Peter Forss Stockholm and Sigtuna GMT +1.00

    Typically, yes, it should. But it also depends on how you opened it (did you use code?), and what it's doing while it's open (is it running any code?). etc...
    Monday, September 7, 2015 3:15 PM
  • I opened the report like this:

    DoCmd.OpenReport "Packing slip", acViewPreview, "", "", acNormal

    There is no code running when the report is opened or closed. No code at all.

    The only thing it does is to show whats in a specific order. In this case beer.


    Best // Peter Forss Stockholm and Sigtuna GMT +1.00

    Monday, September 7, 2015 3:23 PM
  • Hi Peter. You said your old process was like this:

    1. Open the report

    2. Close the report

    3. Open the invoice

    So, I see how you open the report. Now, how do you close it? Then, how do you open the invoice? Also, you said the report has nine subreports. How many subreports does the invoice have?

    Monday, September 7, 2015 3:38 PM
  • Hi Db
    Yes My process was like this:

    1. Open the report Open the report Packing Slip. Using code: See above
    2. Close the report I'm closing the report Packing Slip by clicking the x.
    3. Open the invoice Using a macro Open report "invoice"

    The Report Packing Slip has one sub report. The report Invoice has nine. (Specified VAT, alkohol tax included, our kegs at the customer right now, refund on this invoice etc etc)
    Monday, September 7, 2015 6:20 PM
  • Okay, thanks. So, between all those processes, if you want to troubleshoot why you're getting the error, you'll have to trace every possible connection that is being generated by those objects that you open and if they are being released or not. As I said earlier, each a record has to be fetched from the BE, e.g. combo and listbox row sources, subform/subreport record sources, etc., a connection is created for that transaction, and Access can only have so many of them open at the same time. There is a registry setting to temporarily adjust that number, but I believe there is a hard limit. Good luck!
    Monday, September 7, 2015 7:02 PM
  • Let me add a point that my experience has found; which is that it can be a 'straw that breaks the camel's back' scenario : in that it is not uniquely the cause of 1 process (i.e. opening a report) by itself but rather the total combination of the database actively open.

    In that case I could identify reports that definitely could/should be closed when/if a new report was open - and by auto closing those first upon open of the new report - everything works fine.

    Also, when I have found 1 specific cause - it typically is due to an extremely complex query - possibly designed incorrectly (circular).  If designed correctly I changed the method to write some data to a temp scratch table - so that the entire query did not have to fire.

    just ideas that may help......

    • Marked as answer by ForssPeterNova Tuesday, September 8, 2015 7:23 PM
    Tuesday, September 8, 2015 2:02 PM
  • Hi and thanks

    I will try the temp table idea.

    Will take me some days before I can try it. Am busy in the brewery :-)


    Best // Peter Forss Stockholm and Sigtuna GMT +1.00

    Tuesday, September 8, 2015 5:20 PM
  • Hi

    I changed the Packing Slip Query. Removed one table from query (data not needed on Packing Slip) And voila! No more "cannot open more databases" when opening the Invoice.

    So many thanks to "msdnPublicIdentity" for the idea of checking the complexity of my query.


    Best // Peter Forss Stockholm and Sigtuna GMT +1.00


    Tuesday, September 8, 2015 7:24 PM
  • Hi Peter. Glad to hear you were able to sort it out. Good luck with your project.
    Tuesday, September 8, 2015 7:48 PM
  • Thanks BD guy


    Best // Peter Forss Stockholm and Sigtuna GMT +1.00

    Wednesday, September 9, 2015 1:31 PM