C#.Net, Get the OLEDB provider version

一曲冷凌霜 提交于 2020-01-13 11:06:13

问题


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


回答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




回答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



来源:https://stackoverflow.com/questions/6570066/c-net-get-the-oledb-provider-version

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!