🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Final Question on Compacting Access Databases

#5307
From: Neo
Date: Tue, 19 Jun 2001 12:57
89 lines
3312 bytes
Mike,

I feel your pain. I do not have any code to post, but I do remember once
reading that you may have to unset the password of the database before you
can compact it, even if there is no password set.

Neo


Mike Collins <mcollins@tynetec.demon.co.uk> wrote in message
news:3b2f3c53_1@dnews...
> Does anyone know if it IS POSSIBLE to compact an MS Access 2000 database
> when connecting using ADO and the MS Jet Engine 4.
>
> I've spent the last week trying to compact an Access database, I've been
to
> every site on the net which has a reference to this, and I've posted
> numerouse questions.  Nigal Jones pointed me in the direction of using the
> Import Type Libaray to access the msjro.dll.  I've done all this, pass
what
> I think are the correct parameter, compiled and run.  And the result is
> NOTHING.  Please, please, please, if anyone knows how to achieve this in
> C++Builder (not delphi), could you please post me.  My code is below if
> anyone cares to have a look:
>
> //Project.cpp
>       USE("C:\Program
> Files\Programming\Borland\CBuilder5\Imports\JRO_TLB.h", File);
>
> //Main.cpp#pragma package(smart_init)
>   #pragma link "JRO_TLB"
>   #pragma resource "*.dfm"
>
>   TForm1 *Form1;
>
>   void __fastcall TForm1::BitBtn1Click(TObject *Sender)
>   {
>      try
>      {
>         jet = CoJetEngine::Create();
>         jet->CompactDatabase(
>
> WideString"Provider=Microsoft.Jet.OLEDB.4.0;DatSource=c:\\bob.mdb"),
>
> WideString("Provider=Microsoft.Jet.OLEDB.4.0;Dat Source=c:\\biff.mdb;Jet
>                                     OLEDB:Engine Type=5"));
>      }
>     catch (...)
>     {
>         ShowMessage("Error");
>     }
>  }
>
> //Main.h
>   #ifndef MainH
>   #define MainH
>   #include "JRO_TLB.h"
>   #include <Classes.hpp>
>   #include <Controls.hpp>
>   #include <StdCtrls.hpp>
>   #include <Forms.hpp>
>   #include <Buttons.hpp>
>   #include <Db.hpp>
>
>   class TForm1 : public TForm
>   {
>   __published:
>      TBitBtn *BitBtn1;
>      void __fastcall BitBtn1Click(TObject *Sender);
>   private:
>       TCOMIJetEngine jet;
>   public:
>      __fastcall TForm1(TComponent* Owner);
>   };
>
>
//--------------------------------------------------------------------------
> -
>   extern PACKAGE TForm1 *Form1;
>
>
//--------------------------------------------------------------------------
> -
>   #endif
>
>
>
>
>
Technical Details
Message-ID: <3b2f4c3d$1_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!howland.erols.net!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews
References: <3b2f3c53_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,ec9907cfc07dfcb4
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-06-19 06:07:34 PST
From: "Neo" <klink_stalag13@nospam_yahoo.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3b2f3c53_1@dnews>
Subject: Re: Final Question on Compacting Access Databases
Date: Tue, 19 Jun 2001 08:57:01 -0400
Lines: 91
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
NNTP-Posting-Host: 38.166.43.102
Message-ID: <3b2f4c3d$1_1@dnews>
X-Trace: dnews 992955453 38.166.43.102 (19 Jun 2001 05:57:33 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!howland.erols.net!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews