Totzkeeeeee's Blog

Just because I can...

  Home  |   Contact  |   Syndication    |   Login
  216 Posts | 4 Stories | 345 Comments | 321 Trackbacks

News


My blog is worth $14,678.04.
How much is your blog worth?

Tag Cloud


Archives

Blog Roll

Cool Sites

No.  Not that one. Not that one either.

I’m actually talking about the CorFlags section in the header of a portable executable image.

Wil Peck observed the following error when trying to use the Microsoft Jet OLEDB provider on an x64 machine:

The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine

The simple solution, as Wil points out, is to change the target of your project to x86 rather than Any CPU so that your build will produce a 32 bit executable.

If you have a solution with 32 projects in it, that’s not a simple thing to do.  If all you need to be able to do is run your program locally for testing/debugging purposes, there is a better – well easier – way.  CorFlags.exe

CorFlags allows you to set the 32BIT flag in the header so that the program will be loaded as a 32 bit process.  You can then attach the Visual Studio debugger to the running process and you’re all set.

You can do this to a strong named executable using the /Force option but this will obviously break the signature.  You can re-sign it or not based on your need.  For my purposes, simply running the program was good enough.  You will also need to rebuild the program in Visual Studio before you can push F5 to run it in the debugger.  Since you changed it behind VS’s back, it doesn’t know about the change and will complain that the file is corrupt when it tries to launch it.

Oh, and Wil is also correct in that Microsoft have no plans to make a 64 bit version of the provider available.  Ever.

Dave
Just because I can…

Technorati Tags: ,,
posted on Friday, May 1, 2009 4:47 PM