Re: Estimate space freed up by compacting MS Access
- From: Brian Bushay TeamB <BBushay@xxxxxxxxx>
- Date: Sat, 18 Feb 2006 21:14:42 -0600
"Brian Cryer" <brianc@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in messageThanks for sharing your findings.
news:43f457a2$1@xxxxxxxxxxxxxxxxxxxxxxxxx
Forgive me if this has been asked before: Is there any way of estimating
the amount of space that will be freed up by doing a compact on an
MS-Access database (without actually doing the compact)?
My reason for asking is that we have an application that uses an access
database. Rather than compact it each time we start or stop the
application (because I would rather avoid the delay), I would like to
compact it when the amount of reclaimable space goes over (say) 30%. Is
this possible?
If its relevant, I'm currently using TAdoConnection to connect to the
database, and TJetEngine to compact it.
Thanks in advance.
I've found out how if anyone is interested:
db := TAdoConnection.Create(Application);
db.ConnectionString := ...
db.Open;
reclaimableBytes := db.Properties['Jet OLEDB:Compact Reclaimed Space
Amount'].Value;
this gets returned as a string, and will probably throw an exception if you
are connected to a database other than Access.
hope this is useful to someone.
--
Brian Bushay (TeamB)
Bbushay@xxxxxxxxx
.
- References:
- Estimate space freed up by compacting MS Access
- From: Brian Cryer
- Re: Estimate space freed up by compacting MS Access
- From: Brian Cryer
- Estimate space freed up by compacting MS Access
- Prev by Date: Master-Detail with ADODataSet
- Next by Date: Re: ADODataset Parameter error
- Previous by thread: Re: Estimate space freed up by compacting MS Access
- Next by thread: Field captions from MS Access
- Index(es):
Relevant Pages
|