title: How to determine Jet database Engine Type programmatically
body: <p>I have a program which needs to upgrade any Access (Jet) database it opens to JET Version4.x if it isn't already that version. (This enables use of SQL-92 syntax features)</p>
  
  <p>Upgrading is (relatively) easy. A call to the JRO.JetEngine object's CompactDatabase method (<a href="http://www.codeproject.com/KB/database/mdbcompact_latebind.aspx" rel="nofollow noreferrer">as described here</a>) should do the trick, but before I do this I need to determine whether an upgrade is required. How do I determine the Jet OLEDB:Engine Type of an existing database? Can this be determined from an open OleDBConnection?</p>
  
  <p>Note:</p>
  
  <ol>
  <li>I'm talking about database versions, not Jet library versions. </li>
  <li>C# or .Net solution greatly appreciated.</li>
  <li>This is an application which uses the Jet engine, NOT an Access application.</li>
  </ol>