🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Access Database compression

#2709
From: Viatcheslav V. Vassiliev
Date: Fri, 11 Apr 2003 12:12
36 lines
1992 bytes
Import
Microsoft Jet and Replication Objects 2.x 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,
Viatcheslav V. Vassiliev
http://www.oledbdirect.com
The fastest way to access MS SQL Server, MS Jet (MS Access)
and Interbase (through OLEDB) databases.

"Victor Rattlehead" <envysoft@gmx.net> ???????/???????? ? ????????
?????????: news:oprngp43hn5r2k0c@localhost...
> How can I compress a mdb file in source code
Technical Details
Message-ID: <3e96b168$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <oprngp43hn5r2k0c@localhost>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,2a99fc17fb0ece2d
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-04-11 05:20:12 PST
From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <oprngp43hn5r2k0c@localhost>
Subject: Re: Access Database compression
Date: Fri, 11 Apr 2003 16:12:34 +0400
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 213.247.201.57
Message-ID: <3e96b168$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1050063208 213.247.201.57 (11 Apr 2003 05:13:28 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail