By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,008 Members | 2,895 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,008 IT Pros & Developers. It's quick & easy.

A97 compact database question?

P: n/a
MLH
I just used Tools / Database Utilities / Compact Database
in Access 97 for the first time. Unlike Access 2.0, it does
not ask me to furnish a filename for it to compact into.
It just launched headlong into a process that, after the
fact, had the result of overwriting the 44-meg previous
size file into an 8-meg file of the same name.

Has anyone ever experienced a data-loss during such
a compact operation under A97? Surely, the access
developer team writes a temp file for creating the compact
file or does some sort of backup to disk first BEFORE
overwriting the currently loaded file. Thoughts?
Experience?
Nov 13 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
In the heyday of A95 a compact often corrupted the database. I
developed the habit of closing the database, compacting to a separate
mdb file then compacting the separate mdb file back over the original.
I still haven't gone back to trusting the 'in place' method.

James A. Fortune

Nov 13 '05 #2

P: n/a
MS

"MLH" <CR**@NorthState.net> wrote in message
news:6s********************************@4ax.com...
I just used Tools / Database Utilities / Compact Database
in Access 97 for the first time. Unlike Access 2.0, it does
not ask me to furnish a filename for it to compact into.
It just launched headlong into a process that, after the
fact, had the result of overwriting the 44-meg previous
size file into an 8-meg file of the same name.

Has anyone ever experienced a data-loss during such
a compact operation under A97? Surely, the access
developer team writes a temp file for creating the compact
file or does some sort of backup to disk first BEFORE
overwriting the currently loaded file. Thoughts?
Experience?


Back up the db first - just in case!

I go to the trouble of saving the data (tables) in a seperate .mdb as well,
so even if the worst happens (twice), it's not going to be catastrophic.
Nov 13 '05 #3

P: n/a
MLH <CR**@NorthState.net> wrote in
news:6s********************************@4ax.com:
I just used Tools / Database Utilities / Compact Database
in Access 97 for the first time. Unlike Access 2.0, it does
not ask me to furnish a filename for it to compact into.
It just launched headlong into a process that, after the
fact, had the result of overwriting the 44-meg previous
size file into an 8-meg file of the same name.

Has anyone ever experienced a data-loss during such
a compact operation under A97? Surely, the access
developer team writes a temp file for creating the compact
file or does some sort of backup to disk first BEFORE
overwriting the currently loaded file. Thoughts?
Experience?


If you open Explorer and watch the folder while Access is
compacting, you'll see it writes to db1.mdb, then deletes the
original mdb and renames db1.mdb to the original name. If the
compact fails, however much of db1.mdb that had been written at the
time the compact failed will be left, as well as the original file,
which is unchanged (since all the writing was into db1.mdb).

However, here's a simple rule:

Never compact without a backup.

I break it all the time, though, and have never once lost a minute's
worth of work.

There's on scenario where this is really critical, and that's with
replicated data. A compact can succeed without Access noticing
anything wrong, but replicability can be lost. Of course, you can't
copy replicated files (that creates dead replicas if you aren't
careful), so the way to protect your data is to synchronize it with
another replica before you compact it.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #4

P: n/a
Just to refresh my memory, I opened Access 97 (no database selected), used
Tools | Database Utilities | Compact Database. It first opened a Common
Dialog window to let me choose the database that I wanted to compact, and
when that was chosen, opened another Common Dialog window to let me choose
the database into which I wanted to compact (preset to db1.mdb).

I don't even remember any settings that would bypass the second Common
Dialog window.

However, if you choose Tools | Database Utilities | Compact Database with a
database open, it does as you describe.

So, you have your choice -- compact the current database and let it overlay
the original once it is compacted, or close the current database without
closing Access, compact, and select the database to compact from and the one
into which you want to compact.

Larry Linson
Microsoft Access MVP

"MLH" <CR**@NorthState.net> wrote in message
news:6s********************************@4ax.com...
I just used Tools / Database Utilities / Compact Database
in Access 97 for the first time. Unlike Access 2.0, it does
not ask me to furnish a filename for it to compact into.
It just launched headlong into a process that, after the
fact, had the result of overwriting the 44-meg previous
size file into an 8-meg file of the same name.

Has anyone ever experienced a data-loss during such
a compact operation under A97? Surely, the access
developer team writes a temp file for creating the compact
file or does some sort of backup to disk first BEFORE
overwriting the currently loaded file. Thoughts?
Experience?

Nov 13 '05 #5

P: n/a
MLH
Thx, David. Good suggestion on opening explorer during the
process. 'preciate it.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

If you open Explorer and watch the folder while Access is
compacting, you'll see it writes to db1.mdb, then deletes the
original mdb and renames db1.mdb to the original name. If the
compact fails, however much of db1.mdb that had been written at the
time the compact failed will be left, as well as the original file,
which is unchanged (since all the writing was into db1.mdb).

However, here's a simple rule:

Never compact without a backup.

I break it all the time, though, and have never once lost a minute's
worth of work.

There's on scenario where this is really critical, and that's with
replicated data. A compact can succeed without Access noticing
anything wrong, but replicability can be lost. Of course, you can't
copy replicated files (that creates dead replicas if you aren't
careful), so the way to protect your data is to synchronize it with
another replica before you compact it.


Nov 13 '05 #6

P: n/a
MLH
Thx, Larry. How have you been. Its been a long time.
The second pattern of behavior (running compact
with an open database running) is what caught me
by surprise. I wasn't ready for it. All is well, just checking
behind myself.
Nov 13 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.