compact and repair

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have quite a large database which gets used on many different users of one
computer and is networked to another computer and gets used there only on the
main user.

How often should i run compact and repair - every week ? what is the code to
do this automatically?
 
That is relative with the amount of bloat and the frequency of computer
crashes (which can cause corruption). Our main server database gets
compacted about twice a week, we have another which is compacted about once
a week. Some of my client's databases are compacted daily, others as little
as once a month. Unfortunately, "many different users" doesn't give me much
to work with.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
But is there a way to do this in code?



Arvin Meyer said:
That is relative with the amount of bloat and the frequency of computer
crashes (which can cause corruption). Our main server database gets
compacted about twice a week, we have another which is compacted about
once
a week. Some of my client's databases are compacted daily, others as
little
as once a month. Unfortunately, "many different users" doesn't give me
much
to work with.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
I should have been a little clearer...

I have linked tables where my Access program loads and unloads them... is
there a simple way to them compact these databases and reclaim the wasted
space?

The invoking program is set to compress on close.

Thanks again!

Gary D
 
Sorry, I've been out of town. Yes you can compact external databases in
code, but you need to do it from a database that is not linked to it. Just
use a "maintenance" database and open it when you close the current
front-end. The syntax is:

DBEngine.CompactDatabase C:\Path\Oldname, C:\Path\Newname
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Compact and Repair Advice 14
Compact and Repair 12
compact and repair 6
compact and repair when database is split 10
Compact and Repair a Database 2
compact and repair the be 4
Compact & Repair Question 1
Compact & Repair 14

Back
Top