Results 1 to 8 of 8
  1. #1
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    'Can't Open More databases' (2002)

    Hi,

    I'm trying to print a report that is 7 pages long with multiple sub reports in it. It opens fine to screen preview but when I go to print it I get the following error:

    Cannot open any more databases. (Error 3048)
    You have reached the limit on the number of databases that can be opened at one time. Close one or more databases and try the operation again.

    I am confused as there is only one database open. I have other reports that are longer with multiple subreports so I'm not sure what is going on with this.

    BTW, the report does not print.

    Thanks,
    Leesha

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: 'Can't Open More databases' (2002)

    The error message is confusing; "connections" would have been a better term than "databases". When you are working with linked tables, you open multiple connections to the backend database; you'll find some details in the threads starting at <post#=306982>post 306982</post#> and <post#=313051>post 313051</post#>.

    The only remedies are
    - Try to simplify your queries
    - Make sure you close all recordset objects that you open in code as soon as you're done with them.

  3. #3
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: 'Can't Open More databases' (2002)

    Hi Hans,

    Thanks for the links. I'll start hunting. The message I posted came from right from Access. I appreciate the explanation as it didn't make sense to me.

    Leesha

  4. #4
    Star Lounger
    Join Date
    Jun 2001
    Location
    Christchurch, New Zealand
    Posts
    73
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 'Can't Open More databases' (2002)

    Hi Leesha

    i struck this error some time back with a very complex db with multiple forms that are open at the same time, with many subforms and many combo box's. i never actually found a 'solution' but after reading and searching the net I redeveloped it and since then have not had the error message. This App was also multi user)

    In addition I have every only struck this in Access XP, I had another client with a huge db massive number of tables/conections and multi user this was access97 and then upgraded to 2000. Never caused a problem.

    As Hans pointed out I targeted the following areas:

    * Make sure you close all recordset objects that you use.
    * I used only 1 lookup table for all combo's rather than individual table for city/country etc with this application. (cuts down nbr of table connections)
    * I have the lookup table based in the front end (on each PC) and sync it with the back end (i.e when opening new data loaded to front end and when new type added checks back end etc) I believe that a local table use only 1 connection and linked uses 2, hence having it local made the db quicker and also cut down on the nbr of connections.
    * I made sure that all PC's had the same patch's and updates installed

    As a result the db has been fine since, infact it is now more complex with more forms and there are more users on board using it. (still in XP) I think the biggest enhancement was bringing the lookup data into the front end as they are lots of combo box's, hence they retrieve data locally and don't send data across the network. this seemed to provide better performance also.

    Cheers
    Tony

    P.S I'd be interested to know if anyone has struck this problem in other version other than XP?

  5. #5
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: 'Can't Open More databases' (2002)

    In addition to the suggestions you've already received, I'm aware of one or two cases where an extremely complex form which had been worked on extensively over time has been know to create this error message. The problem has been resolved by either redesigning the form starting from scratch, or by saving the from in a text fashion using the SaveAsText command in VBA. I would pursue the other options first, but if that doesn't solve the problem, you might consider looking at any really complex forms.
    Wendell

  6. #6
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: 'Can't Open More databases' (2002)

    Hi Tony and Wendell,

    I reworked the report as well as streamlined the queries a bit but still had the same error. It's a very large report with multiple subreports in it. Ultimately I ended up having to split it into a part 1 and part 2 report which will work OK. The purpose of the report is to present performance improvement statistics for the agency. Over time the number of catagories will grow due to federal and state mandates so even if I had been able to get it to work now, I'll only have issues over time. My only regret with this approach is the numbering of the pages. Each report starts with page 1 vs report 2 being able to pick up the page sequence where report 1 left off. I guess there could be worse things!

    Leesha

  7. #7
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: 'Can't Open More databases' (2002)

    It is possible to start a report with a page number other than 1 - unfortunately, it is hard to find the HOWTO stuff in 2002 Help, as Page Number brings up only a single topic about headers and footers! If however you expand the Help on the Contents tab, and look at reports, expand Customizing Reports, and then expand the Page Brakes and Page Numbers, there is a topic about how to Reset page numbers for each section. The technique is basically to use a procedure in the OnFormat event for the report. You would need to prompt for a starting page number as there's no easy way I know off to capture the last page number of the first report. Hopefully this will give you some ideas on how to solve the page numbering issue.
    Wendell

  8. #8
    Star Lounger
    Join Date
    Jun 2001
    Location
    Christchurch, New Zealand
    Posts
    73
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 'Can't Open More databases' (2002)

    Hi Leesa,

    What I did find with this error when I was dealing with it was that it is not necessarily specific to any one form or report either. I implemented a whole heap of form tracking and I tested and captured the open db connections. All of this never showed me a specific pattern. The error would occur some days and not others, for some users and not others. (as it is a multi-user db) I really did chase my tail at the time when I first starting trying to track what was causing this error down.

    I also suspect that the db was 'damaged' at one point which started the problems. I say damaged in that it would run ok, but I did strike some issues when first importing the forms etc into a new blank db, hence other things I have done are:

    *On a regular basis during development import the db into a blank db, compile etc
    *Develop new components in a copy of the db
    *Import design changes, leaving the 'actual' development version untouched until importing the changes.

    All of these actions have added up and since I embarked on dealing to this problem over 12mths ago. (See <post#=358057>post 358057</post#>) This db has now been running without error for 12 months, it is now twice the size it was, has more table connections than before, 3 times the number of records etc.

    One has to ask if you can preview the original report why cant you print it?
    Did you trying printing it without previewing?
    Have you tried importing the db into a new version? or just importing the parts that make this report run and seeing if it will run?

    Cheers
    Tony

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •