473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

cannot open any more databases

When running a report..I get the message "Cannot open any more
databases." Run-time error 3048... Has anyone seen this message
before?
Nov 12 '05 #1
6 11654
If this is Access 97, the solution was to download Service Release 2 from:
http://support.microsoft.com/support...cks/Office/97/

If you have the pack or are running a later version, the problem might be
related to the number of domain aggegate calls you are making, e.g. if the
report's query or controls call DLookup(), DMax(), etc. If that's the case,
post back and we will give you a replacement for DLookup().

It's also important to dereference your object variables in your code. For
example, if you have code that uses CurrentDb and OpenRecordset, ensure you
close the recordset and set your object to nothing. This kind of thing:
rs.Close
Set rs = Nothing
Set db = Nothing

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Debbie Gilbert" <dg******@tasconcrete.com> wrote in message
news:47**************************@posting.google.c om...
When running a report..I get the message "Cannot open any more
databases." Run-time error 3048... Has anyone seen this message
before?

Nov 12 '05 #2
dg******@tasconcrete.com (Debbie Gilbert) wrote in message news:<47**************************@posting.google. com>...
When running a report..I get the message "Cannot open any more
databases." Run-time error 3048... Has anyone seen this message
before?


Are you opening recordsets or creating variables and not explicitly
destroying them by setting <object>= Nothing after you finish your
code? That would cause you to run out of resources...
Nov 12 '05 #3
I have had the same problem with A2K, in spite of dereferencing everything
and usind ELookup queries etc rather than DLookup. The problem is compounded
by List Boxes, Combo Boxes, & subforms each of which is running an SQL which
gets reported as "Cannot open any more databases."

Phil
"Debbie Gilbert" <dg******@tasconcrete.com> wrote in message
news:47**************************@posting.google.c om...
When running a report..I get the message "Cannot open any more
databases." Run-time error 3048... Has anyone seen this message
before?

Nov 12 '05 #4
dg******@tasconcrete.com (Debbie Gilbert) wrote in
<47**************************@posting.google.com >:
When running a report..I get the message "Cannot open any more
databases." Run-time error 3048... Has anyone seen this message
before?


This error message is sometimes erroneous in that it's actually
*table handles* that you're running out of. There's a pretty good
discussion of this problem (interpreting the error message both
literally and as evidence of insufficient table handles) at:

http://dbforums.com/arch/42/2003/6/804659

I don't know that anyone reached a solution in that discussion, but
it raises a whole bunch of issues that you need to consider.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 12 '05 #5
al*********@SeeSig.invalid (Allen Browne) wrote in
<3f**********************@freenews.iinet.net.au> :
If this is Access 97, the solution was to download Service Release
2 from:
http://support.microsoft.com/support...cks/Office/97/

If you have the pack or are running a later version, the problem
might be related to the number of domain aggegate calls you are
making, e.g. if the report's query or controls call DLookup(),
DMax(), etc. If that's the case, post back and we will give you a
replacement for DLookup().

It's also important to dereference your object variables in your
code. For example, if you have code that uses CurrentDb and
OpenRecordset, ensure you close the recordset and set your object
to nothing. This kind of thing:
rs.Close
Set rs = Nothing
Set db = Nothing


According to the discussion in:

http://dbforums.com/arch/42/2003/6/804659

using a recordset variable for a recordsetclone opens implicit
database references. So, this:

Dim rs As DAO.Recordset

Set rs = Me.RecordsetClone
rs.FindFirst [whatever]
If Not rs.NoMatch Then Me.Bookmark = rs.Bookmark
Set rs = Nothing

will (in A2K) cause an implicit database reference to be created
that is not released at the end.

The solution is to not use a recordset variable, but to use a With
block:

With Me.RecordsetClone
.FindFirst [whatever]
If Not .NoMatch Then Me.Bookmark = .Bookmark
End

That does not have the same problem.

It's also a good lesson -- don't use a Set statement with a
variable if a With block is usable in the same context.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 12 '05 #6
David, thanks for posting the link to this discussion.

The behavior makes no sense to me, but I am still seeing the same result in
Access 2003. It is something that needs further investigation, but does
appear to be an issue with this error.

Appreciated.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"David W. Fenton" <dX********@bway.net.invalid> wrote in message
news:94***************************@24.168.128.86.. .
al*********@SeeSig.invalid (Allen Browne) wrote in
<3f**********************@freenews.iinet.net.au> :
If this is Access 97, the solution was to download Service Release
2 from:
http://support.microsoft.com/support...cks/Office/97/

If you have the pack or are running a later version, the problem
might be related to the number of domain aggegate calls you are
making, e.g. if the report's query or controls call DLookup(),
DMax(), etc. If that's the case, post back and we will give you a
replacement for DLookup().

It's also important to dereference your object variables in your
code. For example, if you have code that uses CurrentDb and
OpenRecordset, ensure you close the recordset and set your object
to nothing. This kind of thing:
rs.Close
Set rs = Nothing
Set db = Nothing


According to the discussion in:

http://dbforums.com/arch/42/2003/6/804659

using a recordset variable for a recordsetclone opens implicit
database references. So, this:

Dim rs As DAO.Recordset

Set rs = Me.RecordsetClone
rs.FindFirst [whatever]
If Not rs.NoMatch Then Me.Bookmark = rs.Bookmark
Set rs = Nothing

will (in A2K) cause an implicit database reference to be created
that is not released at the end.

The solution is to not use a recordset variable, but to use a With
block:

With Me.RecordsetClone
.FindFirst [whatever]
If Not .NoMatch Then Me.Bookmark = .Bookmark
End

That does not have the same problem.

It's also a good lesson -- don't use a Set statement with a
variable if a With block is usable in the same context.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc

Nov 12 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
4
by: Koen | last post by:
Hi all, At work I created a database which is really helpful. The database is used by approx 15 users. Everything worked great, until I added some 'scoreboard' forms and reports. I get the...
46
by: Steve | last post by:
Access97 Database The database is split into a frontend and backend and not connected to any other database. The database has an unbound report with 15 subreports. Some of the subreports include...
15
by: Dave | last post by:
Has anyone encountered the error message "Can not open any more databases" and what did you do to solve it? Thanks, Dave
6
by: ultraton | last post by:
While trying to print a report from Access the user receives the following error: Cannot open any more databases. Okay Help Does anyone have any ideas about this behavior? Thank you very...
6
by: ABC | last post by:
I write the code as: <asp:LinkButton ID="LinkButton2" Text='<%# Eval("Title") %>' PostBackUrl='file://<%# Eval("path") %>' runat="server"></asp:LinkButton> But It don't work to download or open...
0
by: Holly Cross | last post by:
I have a report that uses several subreports. The report looks fine in print preview, but when I send it to the printer, I keep getting this message "Cannot open any more databases." This happened...
0
by: bhipwell via AccessMonster.com | last post by:
I am getting the 3048 error: "Cannot open any more databases." I have a couple forms loaded with tabs covered in combo boxes, list boxes, etc. The error occurs when running a form with 12...
2
n8kindt
by: n8kindt | last post by:
i'm stuck. i'm using access 2007 on a windows vista machine (i've tried running on xp too, though--same result) and this is the error i keep getting whenever i try running my main query: Cannot...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.