Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

"Temporary Object" Leak

Posted on 1998-03-04
2
Medium Priority
?
240 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 400 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

Industry Leaders: 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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

610 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