title: Jet Engine Unrecognized Database Format
body: <p>I am trying to compact my database using vb.net and I keep getting the error message </p>
  
  <blockquote>
    <p>Unrecognized database format 'C:\Forte\Fortedb.accdb'.</p>
  </blockquote>
  
  <p>I have looked around and haven't found anything to help me. Here is my code</p>
  
  <pre><code>Private Sub Compactdb()
  
      Dim JRO As JRO.JetEngine
      JRO = New JRO.JetEngine
  
      'The first source is the original, the second is the compacted database under another name.
      JRO.CompactDatabase("Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=C:\Forte\Fortedb.accdb;", "Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=C:\Forte\Compactdb.accdb;")
  
      'Original not compacted database is deleted
      System.IO.File.Delete("C:\Forte\Fortedb.accdb")
  
      'Compacted database is renamed to the original database's name. 
      Rename("C:\Forte\fortedb.accdb", "C:\forte\Compactdb.accdb")
  
      'User notification
      MsgBox("The database was compacted successfully")
  
  End Sub
  </code></pre>