?
Solved

"Temporary Object" Leak

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

765 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