5/7/2021 0 Comments Jet Oledb Provider
Typically things like SQL Server will install both 32 bit and 64 bit providers on a 64 bit machine.When deployed the application in a 64 bit server it shows the error Microsoft.Jet.OLEDB.4.0 provider is not registered on the local machine.But, the same project uses other DB drivers (DB2, SQL etc.) to connect to other databases.So when i deployed my app again in the 64 bit OS, it throws the exception Attempted to load a 64-bit assembly on a 32-bit platform.
Jet Oledb Provider 32 Bit And 64The issue I described in my question occured basically due to the incompatibility of the Microsoft.Jet.OLEDB.4.0 driver in 64 bit OS. I have used it for Excel file manipulation and it worked fine for me in both the environments. The workaround is that you use 32-bit version of Access Database Engine 2010 and force your.NET application to run in 32-bit mode (e.g. Configuration Manager). And the proper solution is to replace MS Access with a better alternative. In case someone encounter this too, you will have to install 32-bit ODBC drivers and then create your DSN in that. Install the redistributable linked in neos answer, then use the Provider string suggested in Iqbals answer. ![]() This hack works till Office 2013 only, Microsoft stopped this workaround from Office 2016 for Microsoft.ACE.OLEDB.16.0 drivers. When I changed the project configuration from AnyCPU to X86, the problem went away. You need this setting off if you want to be able to avoid the 4GB barrier. Jet Oledb Provider .Exe And HadIn my case, I only had the finished.exe and had to use this solution. It uses CorFlags.exe from the.Net SDK to change the loading characteristics of the application. I havent changed any IIS setting and not installed any extra software. It is already opened exclusively by another user, or you need permission to view and write its data. If you want to support multiple DB sources including Jet to Excel you will need at least that part of your application to run in a 32 bit process. Also i got the error in x86, when i try to run it in the 64 bit OS. I think this is because the DB2 driver installed in the 64bit OS is a 64bit version and when it is refferenced from the application, which is configured to run in 32 bit mode, causes the error. As to the DB2 issue you would to look for some DB2 experts on this perhaps another DB2 specific question.
0 Comments
Leave a Reply. |