I have an Access database that is corrupted.

Dim j As New JetEngine

Dim s As String
Dim d As String

s = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\broken.mdb; Persist Security Info=False"
d = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\fixed.mdb; Jet OLEDB:Engine Type=5"

j.CompactDatabase s, d

Now, in DAO you could repair the database but in ADO they claim that repair is built into the CompactDatabase function. However I get this error when trying to compact(repair) it:

-2147467259 - Unrecognized database format 'c:\Broken.mdb'

It fixes it in Access but I have to do it programmatically.

Any ideas??