Re: Estimate space freed up by compacting MS Access
- From: "Brian Cryer" <brianc@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 17 Feb 2006 10:11:43 -0000
"Brian Cryer" <brianc@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
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 Cryer
www.cryer.co.uk/brian
.
- Follow-Ups:
- Re: Estimate space freed up by compacting MS Access
- From: Brian Bushay TeamB
- Re: Estimate space freed up by compacting MS Access
- References:
- Estimate space freed up by compacting MS Access
- From: Brian Cryer
- Estimate space freed up by compacting MS Access
- Prev by Date: Re: ADO with paradox
- Next by Date: Re: Field captions from MS Access
- Previous by thread: Estimate space freed up by compacting MS Access
- Next by thread: Re: Estimate space freed up by compacting MS Access
- Index(es):
Relevant Pages
|