views:

483

answers:

3

I run Windows Server 2008/IIS 7.

From a Web Service I attempt to read from a local mdb file.

If I set the target platform to any or x64 I get the error: The 'Microsoft.JET.OLEDB.4.0' provider is not registered on the local machine.

If I set the target platform to x86 I get the error: An attempt was made to load a program with an incorrect format.

What can I do to solve this?

A: 
  1. There is no 64-bit OLEDB provider for Jet. So no mdb access on 64-bit.

  2. Assembly compiled for 32-bit on IIS running on a 64-bit OS requires that "Enable 32-Bit Applications" is set to TRUE in the Advanced Settings for the Application Pool of the Web Service.

lox
A: 

Thank you lox!!!

I was tring to do the opposite: Debug a 32-bit app with "Edit and Continue" that had a WebService in the solution. (As Edit and Continue won't work on a project in 64-bit)

RyanK
A 64-bit version of Jet/ACE is now available in beta. I don't have the URL, but others have found it on the MS website with no issues. It exists because Access 2010 will ship in both 32- and 64-bit versions, and part of developing that is creating a 64-bit ACE. Others have claimed it solves their problem, even the beta.
David-W-Fenton
+1  A: 

However, there is currently an unfortunate limitation of the 64-bit ACE driver – it cannot co-exist with 32-bit versions of Microsoft Office.

Avneendra
This is a very useful caveat. Thanks for posting it. However, in the context of this question (running on a web server), it's highly unlikely that Office would be installed at all, no?
David-W-Fenton