Article View: borland.public.cppbuilder.database.ado
Article #1368Re: Compacting Database
From: Kim Utley
Date: Tue, 27 Jul 2004 19:48
Date: Tue, 27 Jul 2004 19:48
107 lines
4419 bytes
4419 bytes
Mr. Vassiliev,
Thank you for your help! Everything appears to be working properly.
Kindest Regards,
Kim Utley
"Viatcheslav V. Vassiliev" <support@oledbdirect.com> wrote in message
news:410602f8$1@newsgroups.borland.com...
> > > Import "Microsoft Jet and Replication Objects 2.x Library".
> In IDE menu, choose "Project\Import type library" and import this library.
> You will have jro_h.tlb in ($BCB)\Imports and jro_tlb.cpp will be
included
> into your project.
>
> If you have no "Microsoft Jet and Replication Objects 2.x Library" in list
> (very unlikely), install MDAC and Jet SP from
> http://www.microsoft.com/downloads .
>
> //------------------------------------------
> Regards,
> Vassiliev V. V.
> http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
> ADO.Net
> http://www.oledbdirect.com - The fastest way to access MS SQL Server,
> MS Jet (Access) and Interbase (through OLEDB)
>
>
> "Kim Utley" <kim@simsware.com> �������/�������� � �������� ���������:
> news:41055e5c$1@newsgroups.borland.com...
> > I've performed a "dir /s jro_tlb.h" on my computer but cannot find the
> > header. Can someone please tell me where I can obtain it and the
> replication
> > objects library?
> >
> > Kindest Regards,
> >
> > Kim Utley
> >
> >
> > "Viatcheslav V. Vassiliev" <support@oledbdirect.com> wrote in message
> > news:41053e82@newsgroups.borland.com...
> > > When compacting Access db it must be disconnected. Compact always into
> > > another file. Later you may delete initial file and copy new file into
> its
> > > place.
> > >
> > > 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);
> > > try
> > > {
> > > 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());
> > > }
> > > __finally
> > > {
> > > JetEngine->Release();
> > > }
> > > }
> > >
> > > Compact will also repair database.
> > >
> > > //------------------------------------------
> > > Regards,
> > > Vassiliev V. V.
> > > http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
> > > ADO.Net
> > > http://www.oledbdirect.com - The fastest way to access MS SQL Server,
> > > MS Jet (Access) and Interbase (through OLEDB)
> > >
> > >
> > > "Kim Utley" <kim@simsware.com> �������/�������� � �������� ���������:
> > > news:41052d23$1@newsgroups.borland.com...
> > > > RE: BCB 6 and TADO... Objects
> > > >
> > > > Hi All,
> > > >
> > > > Can anyone provide a simple method for compacting a Microsoft Access
> > > > database file using TADO objects?
> > > >
> > > > I've looked at the MSDN website and saw a utility they provide but
am
> > > > looking for a 'built-in' method to use within my application.
> > > >
> > > > Kindest Regards,
> > > >
> > > >
> > > > Kim L. Utley
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Technical Details
Message-ID:
<4106b18c$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<41052d23$1@newsgroups.borland.com> <41053e82@newsgroups.borland.com> <41055e5c$1@newsgroups.borland.com> <410602f8$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,b011e14d990002e1 X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII From: "Kim Utley" <kim@simsware.com> Newsgroups: borland.public.cppbuilder.database.ado References: <41052d23$1@newsgroups.borland.com> <41053e82@newsgroups.borland.com> <41055e5c$1@newsgroups.borland.com> <410602f8$1@newsgroups.borland.com> Subject: Re: Compacting Database Date: Tue, 27 Jul 2004 14:48:27 -0500 Lines: 109 Organization: SIMS, Inc. X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 65.205.74.2 Message-ID: <4106b18c$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1090957708 65.205.74.2 (27 Jul 2004 12:48:28 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail