Re: help, my accessxp-db certenly become "compressed"

From: Nikos Yannacopoulos (nyannacoREMOVETHISBIT_at_in.gr)
Date: 02/18/05


Date: Fri, 18 Feb 2005 11:32:16 +0200

Erik,

One of Access's shortcomings (actually Jet's, which is Access's database
engine) is that it does not release space when no longer used, like when
you delete records or objects. This causes the database to bloat over
time, and this is why Access has a built-in compacting function -
actually it is Compact and Repair, it recovers unused space and repairs
indices etc. The point is, you should do it once in a while (Tools >
Database Utilities > Compact and Repair Database), and following that
you will witness the kind of file size reduction you are talking about.
A good idea is to set the database to auto-compact every time you close
it (Tools > Options, General tab, Compact On Close).
Now, the "data my be lost" message sounds like you changed a field's
type or size in table design. In that case you do lose data if, for
instance, you change a text fields length from 255 to 20 and you have
data with length > 20 (it's truncated to 20 chars), but if your data
wasn't any longer than 20 in the first place, then you lose nothing.
This is probably why you don't see any change in your data. The
secondary effect of such a change is a database size reduction
(following a compact and repair), as a field which required 255 bytes of
storage, now only requires 20 in the above example; of course, this only
becomes apparent on a big table: (255 - 20) = 235 butes x 100,000
records = 22MB, while 235 bytes x 50 records = 12KB.

Hope it is clearer now.
Nikos

erik wrote:
> Hi
> While working with my AccessXP-db, just tasting in new records, something happend
> "data my bee lost"
> but Access started up again and I kept working.
>
> Later when making a backupcopy (used to be 14Mb) it was now only 4Mb ! ! !
>
> When looking into explorer there is now 2 files. A backup at 14Mb and one on 4Mb and
> it seems to be the 4Mb-file that I have been working on all night and at a fast look
> no data seems to be missing :-)))
>
> What has happend ???
>



Relevant Pages

  • Re: Form Dirty not firing
    ... also forces me to do a backup and compact and repair again. ... MISSING references. ... Database Utilites... ...
    (microsoft.public.access.formscoding)
  • Re: Join Split Database
    ... Correction - I was able to compact and repair; it was when I tried to import ... Make two copies of the BE file and place in separate folders on ... Best case scenario is the users will not need to use the database ...
    (microsoft.public.access.gettingstarted)
  • Re: Invalid bookmark when entering data in a subform
    ... The compact and repair, decompile and compile, and importing into a new ... And here is a standard sequence to fix a problem database. ... Still in the code window, choose Compile from the Debug menu. ...
    (microsoft.public.access.forms)
  • help with corrupt database
    ... I read your post below in the hope of finding help with a database that's ... I can't run the compact & repair utility now - I just get the same error. ... Do you think this file is corrupt beyond repair then? ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Form Dirty not firing
    ... I no longer think that my database is corrupt. ... If the property is not set, the event procedure will not run. ... > also forces me to do a backup and compact and repair again. ...
    (microsoft.public.access.formscoding)