Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   CompactDatabase (http://www.velocityreviews.com/forums/t788883-compactdatabase.html)

Christopher Brandsdal 07-25-2003 02:17 PM

CompactDatabase
 
Hi!
I found a database tool-script that has a functin for compacting the
database....
What is the point of compacting the database? Is it necessary?
Anyone know the advantages of doing this???


a short copy of the code
////////////////////////////////////////////////////////////////////////////
/
var oJet = Server.CreateObject("JRO.JetEngine");

oJet.CompactDatabase("Provider=Microsoft.Jet.OLEDB .4.0;Data Source=" +
sDbFName,
"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=" + sTempDbFName);
////////////////////////////////////////////////////////////////////////////
/




Thanks a lot in advance.

best regards Christopher



Ray at 07-25-2003 02:26 PM

Re: CompactDatabase
 
Frees up junk space from deleted records, reseeds autonumbers, where
applicable. I personally think it's generally a good idea to compact from
time to time.

Ray at work

"Christopher Brandsdal" <christopherwb@c2i.net> wrote in message
news:eAk2DerUDHA.2564@tk2msftngp13.phx.gbl...
> Hi!
> I found a database tool-script that has a functin for compacting the
> database....
> What is the point of compacting the database? Is it necessary?
> Anyone know the advantages of doing this???
>
>
> a short copy of the code
>

////////////////////////////////////////////////////////////////////////////
> /
> var oJet = Server.CreateObject("JRO.JetEngine");
>
> oJet.CompactDatabase("Provider=Microsoft.Jet.OLEDB .4.0;Data Source=" +
> sDbFName,
>

"Provider=Microsoft.Jet.OLEDB.4.0;Data
> Source=" + sTempDbFName);
>

////////////////////////////////////////////////////////////////////////////
> /
>
>
>
>
> Thanks a lot in advance.
>
> best regards Christopher
>
>





All times are GMT. The time now is 01:11 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.