title: How do I enumerate installed OleDb providers for current processor architecture?
body: <p>I've a project that connects to a dBase format database file, that I've always done in the past with a connection string of the form of:</p>
  
  <blockquote>
    <p>PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=MyData.dbf;Extended Properties=dBASE 5.0</p>
  </blockquote>
  
  <p>I've had to revisit this recently, and have found that when attempting to create an <code>OleDbConnection</code> with that connection string on x64 machines, that have an x86 install of Office on it, it throws an exception.</p>
  
  <p>A quick <a href="https://stackoverflow.com/questions/1735392/the-microsoft-jet-oledb-4-0-provider-is-not-registered-on-the-local-machine">hack of a fix</a> shows that forcing the application to target x86 only makes it work, but I was hoping to be able to tidy this up and check in advance whether it would fail to create the connection, so that I could customise my import options to suit the available providers.</p>
  
  <p>Is it possible to enumerate the available data providers <strong>for the current processor architecture</strong>? (other than relying on catching the exception -- after all, the Framework Design Guidelines suggest that you <em>should</em> only throw in exceptional circumstances, and you have a method to check if something would throw an exception)</p>