title: How do I compact and repair an ACCESS 2007 database by .NET code?
body: <p>I need to compact and repair an Access 2007 .accdb database file. I know that JRO.JetEngine can do this with .mdb files, but I need to repair the newer version 2007 format by code.</p>
  
  <p>Any suggestions?</p>
  
  <p>EDIT:</p>
  
  <p>Here is the thing: I found that I can use the COM object library "Microsoft Office 12 Access Database Engine Object Library" and use the DBEngine class and call its CompactDatabse method.
  But there doesn't seem to be a place for me to provide the database password; Seems like Office 12 Database Engine doesn't have any documentation anywhere.
  I found some documentation for older versions of CompactDatabase method but those don't help me at all.</p>
  
  <p>This is driving me crazy.</p>