jetengine compact reopening connection error

From: willem mooi wilten (mooiwilten_at_hetnet.nl)
Date: 05/31/04


Date: 30 May 2004 16:31:56 -0700

Hi everyone,

I'm using D7, ADO, ADOX, Ms Access database.

When i close a connection to compact an access database, reopening the
connection renders an errorno -2146825068 stating: "Supplied provider
is different from the one already in use."

Can anyone tell me what is going on?
really appreciate it!

Willem MW

(snippets)
with connection do
  begin
    close;
    compact(); <-- successfully
    open; <-- error reopening the database
  end;

procedure compact() goes as follows...
  ...
  try
    ...
    try
      JetEngine := CoJetEngine.Create;
      JetEngine.CompactDatabase(SourceConnection,
DestinationConnection);
    except
      on E: Exception do
        MessageBox(bla bla);
    end;
  finally
    JetEngine:= nil;
  end;



Relevant Pages

  • Re: How to use access query computed fields in Word mailmerge
    ... Once you have gone through the connection process once, ... To make a DDE connection in code from Word 2000/2002 I think you will need ... My access databases have lots of these computed query ... >>> an access database with any data in it. ...
    (microsoft.public.word.mailmerge.fields)
  • Help with Script Task an Access database
    ... I want to compact an Access Database within a script task. ... I use this connection in a Data Flow Task to transfer data from a SQL Server ...
    (microsoft.public.sqlserver.dts)
  • Re: How to stop source prompt in mail merge from access
    ... Are you calling OpenDataSource in your Access code? ... connection from the Word mail merge main document because Word will try to ... > The mail merge is being called from the Access database via a Visual Basic ...
    (microsoft.public.word.mailmerge.fields)
  • Re: error messages when connecting to an MS Access query
    ... I'm actually opening the Word document from VBA in the Access database, ... It's actually easy to run a Make Table query in Access, ... I got messages saying it couldn't make the connection. ... When you try to make a DDE connection, if the database is not already ...
    (microsoft.public.word.mailmerge.fields)
  • Re: JDBC Applets - MS Access
    ... > I am working on a Applet at the moment which must be able to access ... > I need to be able to setup a jdbc connection to an Access database. ... JDataConnect also uses a server side JDBC server. ...
    (comp.lang.java.databases)