🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #4122

Re: compact database

#4122
From: Vassiliev V.V.
Date: Thu, 21 Mar 2002 09:59
38 lines
1987 bytes
Import
Microsoft Jet and Replication Objects 2.6 Library

#include <JRO_TLB.h>
...
void __fastcall TForm1::Button1Click(TObject *Sender)
{
 IJetEngine * JetEngine = NULL;
 CoCreateInstance(CLSID_JetEngine, NULL, CLSCTX_INPROC_SERVER,
IID_IJetEngine,
  (void**) &JetEngine);

 WideString Source = "Provider=Microsoft.Jet.OLEDB.4.0;"
  "Data Source=C:\\Test\\Test.mdb;";
 WideString Dest = "Provider=Microsoft.Jet.OLEDB.4.0;"
  "Data Source=C:\\Test\\Compacted.mdb;";

 JetEngine->CompactDatabase(Source.c_bstr(), Dest.c_bstr());

 JetEngine->Release();
}


You can compact database from one file into another. There should be no
users connected to database.

Regards,
Vassiliev V.V.
http://www.oledbdirect.com


"Paolo Casagrande" <nemesis@intelly.com> �������/�������� � ��������
���������: news:3c979b67$1_2@dnews...
> can I compact mdb database as in Access with BCB 5 and ADOExpress
>
> Thanks, Paolo Casagrande
>
>
Technical Details
Message-ID: <3c99b394_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!207.217.77.43.MISMATCH!newsfeed1.earthlink.net!newsfeed.earthlink.net!priapus.visi.com!news-out.visi.com!hermes.visi.com!out.nntp.be!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews
References: <3c979b67$1_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10698b,7aed0e0afd7dbec6
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-03-21 02:26:41 PST
From: "Vassiliev V.V." <vv_vas@iname.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3c979b67$1_2@dnews>
Subject: Re: compact database
Date: Thu, 21 Mar 2002 12:59:22 +0300
Lines: 40
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 62.118.134.5
Message-ID: <3c99b394_1@dnews>
X-Trace: dnews 1016705940 62.118.134.5 (21 Mar 2002 02:19:00 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!207.217.77.43.MISMATCH!newsfeed1.earthlink.net!newsfeed.earthlink.net!priapus.visi.com!news-out.visi.com!hermes.visi.com!out.nntp.be!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews