Re: Cannot attach to Services Manager

From: Wayne & Carr (no_at_spam.com)
Date: 09/25/04


Date: Sat, 25 Sep 2004 13:48:03 -0500

Hello: ["Viatcheslav V. Vassiliev"];
>
> To compact Access database import "Microsoft Jet and Replication Objects
2.6
> Library" and execute:
>
> //----------------------------------------------
> uses JRO_TLB;
>
> {$R *.dfm}
>
> procedure TForm1.Button1Click(Sender: TObject);
> var
> engine: IJetEngine;
> src, dst: WideString;
> begin
>
> //src is connection string to existing database with old password
> src := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + oldFileName;
> //dst is connection string to compacted db with new password
> dst := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + newFileName;
>
> engine := CoJetEngine.Create();
> engine.CompactDatabase(src, dst);
> end;
> //-----------------------------------------------

Thank you for your time and the code sample.
I imported the [Microsoft Jet and Replication Objects 2.6]
And the import was successful.

In the code:
==============
> //src is connection string to existing database with old password
> src := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + oldFileName;
> //dst is connection string to compacted db with new password
> dst := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + newFileName;
==============
Password = ?? Does this mean that I have to assign the Username & Password
To the Database Connection in [TADOTable] In order to use this?
As I attempted to connect to my Database with the "UserID & PassW" and it
gave me
An error.

This is what I get when I run the project and then try to backup:

---------------------------
Debugger Exception Notification
---------------------------
Project CFF_KB_Admin.exe raised exception class EOleException with message
'Authentication failed'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------

And this is the line that it stops at:
 engine.CompactDatabase(src, dst);

I know that by the "Exceptin" That it cannot Authenticate me access the
Database.
Even though I am already in it.
Could you perhaps provide a little more informaiton on this please?

Thank You
Wayne



Relevant Pages

  • Re: Connecting to an Access database
    ... Microsoft JET Database Engine error '80004005' ...
    (microsoft.public.inetserver.asp.db)
  • Re: *** HELP *** Problems Accessing Simple VB.NET Access Database
    ... The Microsoft Jet database engine cannot open the file ... When I define the Connection String in the ... permissions for an individual file or for directory hierarchies. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Connecting to an Access database
    ... Mike Brind wrote: ... attempt in code to open a connection to the database. ... Microsoft JET Database Engine error '80004005' ... Bear in mind that backups of mdb files are normally done as a scheduled ...
    (microsoft.public.inetserver.asp.db)
  • Re: Connecting to an Access database
    ... A corrupted mdb file will prevent anyone writing to it, ... attempt in code to open a connection to the database. ... Mike Brind wrote: ... Microsoft JET Database Engine error '80004005' ...
    (microsoft.public.inetserver.asp.db)
  • Re: Edits to DBI
    ... Source: Microsoft JET Database Engine ... All fields are included in the DBI. ... I recall having a similar problem, edits not working, ...
    (microsoft.public.frontpage.programming)