C#.Net, Get the OLEDB provider version

14,263

Solution 1

You can use the OleDbEnumerator.GetElements Method . http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbenumerator.getelements.aspx to enumarate the drivers. You ask the versions of them maybe this link helps: http://dotnetref.blogspot.com/2009/04/getting-version-of-oledb-provider.html

Solution 2

Have a look in the registry and see if the Jet OLE DB provider is there

The Path is: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines

Then you will have

Jet 4.0 Engines Jet 2.0 Jet 3.0 Jet 4.0

Share:
14,263
Thanushka
Author by

Thanushka

Updated on July 02, 2022

Comments

  • Thanushka
    Thanushka almost 2 years

    I need to Identify the Installed OLEDB provider version. before reading an Excel file. How can I do that?

  • Davide Piras
    Davide Piras almost 13 years
    See the other answer, a managed API call is always better than a custom registry search because when things change, the managed solution would always work while a registry dependent solution might no longer work.
  • Carlos Quintanilla
    Carlos Quintanilla almost 13 years
    I agree with you Davide, and the answer from caglar_gonul is what I would recommend, however, the original question didn't specify any constraint so my answer is still valid though not the best :)
  • Kiquenet
    Kiquenet almost 8 years
    Distinct versions for 32bit and 64bit ?