473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

A97 compact database question?

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
6 2252
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: James Franklin | last post by:
Hi, I have a number of databases in A2K, written on different machines with different installations of Office. I have found that compacting a database while it is open regularly fails, seemingly...
13
by: Larry L | last post by:
Access is noted for bloating a database when you add and delete records frequently. I have always had mine set to compact on close, and that works great. Now after everyone's advice I split my...
1
by: ColinWard | last post by:
Hello everyone. happy new year. I am trying to code an exit button for my application so that it automatically compacts the database when the user exits the app. Is this necessary or does the...
3
by: Trevor Hughes | last post by:
Hello All I have a database (Access 2000, running on Win 2000), which suffers from bloat over a period of time. In order to solve the problem I set the option to compact on exit. This however...
4
by: Wayne | last post by:
Does "Compact On Close" do a "Compact and Repair" or just a compact. Is a compact necessary (or at least a good idea) on a regular basis, say weekly, for a database that has several hundred records...
2
by: Greg Strong | last post by:
Hello All, I've written code in a test database with test data. Everything seems to be working except compact database in VB code per http://www.mvps.org/access/general/gen0041.htm. The reason I...
6
by: owengoodhew | last post by:
Hi, I am responsible for maintaining an MS Access 97 Database that reliably becomes corrupt following a compact......... About the Database: The database is made up of three linked databases,...
2
by: gibsonsgman | last post by:
hello, i have a question about compactin/repairing a database at runtime. i have code that will do this, but when it runs i get the error "You can't compact the open database while running a...
2
by: Ron | last post by:
Hi All, Using WinXP pro/Access 2000. I have a database that's been used for about 5 months. Transferred lots of data from a dos based program, then the users have been using it for that 5...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.