Solved

"Temporary Object" Leak

Posted on 1998-03-04
2
234 Views
Last Modified: 2008-03-06
This question deals not with specific coding but with Access '97's handling of "Temporary Objects"
Recently my file size on my database has been escalating significantly (from 4MB 2 weeks ago to 84MB today) but that is not all data... After "Compacting" the database the file size returned to 1.4MB.

Q: Why is Access hoarding 82+MB of "Temporary Objects" - how are they getting there and how do I force Access to clean up after itself?

Thx in advance
0
Comment
Question by:Terran
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
BigJ earned 100 total points
ID: 1970025
Access creates the temporary objects as you design objects which need to be compiled. There is no way to stop this except to compact now and again.

The only way to get around this is to automatically compact the database every so often. As Cekman said to another question, you can not use the compactdatabase in code to compact the database that is open. However, there is an article that discusses how to create a separate database that will compact any number of databases for you at a specified time. It is KB article Q158937 on the microsoft support site - www.microsoft.com/support

It describes how to create a separate database that can be opened that will automatically compact whatever databases you choose, and also some of the limitations for using code to compact.

0
 
LVL 3

Expert Comment

by:guillems
ID: 1970026
Make a procedure to compact the database

The code do that this is:

' Parameters aName is the name of the database to compact.

Function CompactMDB(aName As String) As Integer
  Dim ws As Workspace, db As Database, nname As String

  nname = Left(aName, Len(aName) - 3) & "NEW"
  DBEngine.CompactDatabase aName, nname
  Kill aName
  Name nname As aName
  CompactMDB = True

End Function

Put the next code in a click's event button.

I hope this help you
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question