Friday, September 9, 2016

Using Access Oledb Engine with .Net Programs

    I have used the Microsoft Jet engine to read csv and excel files for quite a while. However, the newer versions of Excel are not readable utilizing the Jet Engine.  To read new Excel created with later versions, it is necessary to use the Microsoft Access Oledb DataBase Engine functions, which are actually part of Office 2010.  So, unless you have 32 Bit Office 2010 installed, you need to download this from Microsoft.

     The problem I encountered revolved around using .Net applications, both Web Based and desktop, to read Excel files using the above mentioned method.   A problem occurs when trying to install the Access DataBase engine on computers running 64 Bit Office.  There is a 64 bit version of the Access Oledb Engine you can install, but the .Net programs only run with the 32 bit version. If you try to install the 32 bit Access Oledb engine normally, you receive an error stating that you are trying to install a 32 bit driver on a system containing 64 bit Office applications.

    So, in order to install the necessary 32 bit Access Oledb engine, you must install the program from the command line and add /passive to the command. This bypasses the message about 32/64 incompatibilities and allows installation necessary for the .Net programs

ie
c:\accessDataBaseEngine.exe /passive

is the command line you enter

No comments:

Post a Comment