using JRO compactdatabase method to repair corrupt access 2000 database

using JRO compactdatabase method to repair corrupt access 2000 database

Post by Paul Astil » Fri, 19 May 2000 04:00:00



Hi

I have a corrupt database that I am trying to repair using the following
code

   Dim je As New JRO.JetEngine

   je.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data
Source=C:\Nine X\Duffo.mdb", "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data
Source=C:\Nine X\old.mdb;"

All I get is 'Unrecognised database format C:\Nine X\duffo.mdb'

Any ideas ??

 
 
 

1. Compacting a database using JRO's CompactDatabase Method

Hi all

I am trying to compact a database using, as I mentioned in the subject, Jet
and Replication Object's CompactDatabase Method.

Here is my code:

Public Function CompactDatabase(Source As String, Destination As String)
Dim jroDB As JetEngine
Dim strConSrc As String
Dim strConDest As String

  Set jroDB = New JetEngine

  strConSrc = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='" & Source &
"'"
  strConDest = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='" &
Destination & "'"

  jroDB.CompactDatabase strConSrc, strConDest

  Set jroDB = Nothing

End Function

Where Source and Destination are the path and database names.

Now I would assume that when this completes it will be the destination file
that is the result of the compaction process.  If this is correct, the why
when I try to open the destination database I get an Unrecognized Database
Format error?  Am I doing something wrong? Have I misunderstood the use of
this method? Or is there just something inherently wrong with this method?

Thank-you for your input

Regards

Paul

2. IDS 7.31.Txx Windows NT Alaramprogram

3. Problem with Repairing an Access database using JRO

4. Help,Help,Help

5. Problem Repairing an Access database using JRO

6. LOOK HERE!!!!!

7. Repairing an Access database using JRO

8. Top 5 Employee Salaries

9. Problem with Repairing an Access database using JRO

10. Problem Repairing an Access database using JRO

11. CompactDatabase Method of JRO