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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Too many databases open

Status
Not open for further replies.

mguwc

Technical User
Mar 16, 2004
74
US
Hi All -
I have a very unusual problem that I have never encountered before. I have created this database for a unit where there are multi-users. All have been working on it, entering data directly off the phones. As the call ends, the data entry person must print out a report with the information that was taken. The database went live on July 1st. In the beginning it was working fine, without any problems. As the days go by they are encountering a problem when they are printing. The message given is:

Too many databases open. Their only option is ok> I have searched the help library but nothing seems to be the same problem. As anyone ever encountered this problem? As the days go by it seems to happen more frequently.

- Maria
 
Did anyone make any design changes before the error message began popping up? I had some coworkers at my job who had a similar situation occur when one person created a query that was all messed up apparently, b/c when it was deleted, the errors never occurred again.

Stephen [infinity]
"Jesus saith unto him, I am the way, the truth, and the life:
no man cometh unto the Father, but by me." John 14:6 KJV
 
Might be a case of neglected database hygiene. Check and see if database objects have been created in code, but not closed.

Anytime an object is created, it should be explicitely closed:

obj.close
Set obj = nothing


Cheers,
Bill
 
What line of code is the error occurring on?

Ed Metcalfe.

Please do not feed the trolls.....
 
How do I check to see if database objects are closed and where they are located? - Maria
 
Maria

Access provides for enumerating object collections (such as tables, forms, modules). You can also test objects are loaded (.isloaded) and look at their properties.

However I am not sure if those objects (such as a recordset or array) temporarily opened within the scope of a procedure will be included. I am curious and will try to figure out in the near future, but in the meantime perhaps someone else can shed more light.

For good housekeeping purposes, you should go through your code and where ever an object is created in code and you have used a SET statement to assign a reference to the object, then make sure the object is explicitely closed.

Otherwise, Access sometimes tends to leave this objects open untill the application is closed.

Dim dbs as DAO.database
Dim rst as DAO.recordset
Set dbs = currentdb
Set rst = dbs.openrecordset("...")

'this should be at the end of the procedure
RST.CLOSE
DBS.CLOSE
SET RST = NOTHING
SET DBS = NOTHING


Cheers,
Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top