Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C#.Net, Get the OLEDB provider version

Tags:

c#

excel

oledb

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

like image 851
Thanushka Avatar asked Dec 27 '22 18:12

Thanushka


2 Answers

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

like image 112
cgon Avatar answered Jan 09 '23 10:01

cgon


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

like image 36
Carlos Quintanilla Avatar answered Jan 09 '23 09:01

Carlos Quintanilla