A bit of Ole db provider 4.0

My mom always said, if you want to not-to-forget something, “Write it down”. Apparently writing is equivalent to a memory.commit() and prevents phantom reads; I guess I may pass this advice to next generation or my peers, if you want not-to-forget something, “Blog it up”.

Wrote a .net console app to read an Excel file using OLE DB. Was building it for a 64-bit system, and running on a 64 bit system. Didn’t work. Got an error “Microsoft OLE DB 4.0 provider is not registered on this system”. I had fixed that earlier, but couldn’t remember what.

So much for .Net errors. In Java-world I would have had the following exception:

java.ole.db.InvalidOleDb32BitVersus64BitException at
java.ole.db.MicrosoftExcelHelper at
java.lang.DidYouForgetThisAgainException at

The fix is to build the application to Platform x86 via Project Properties.


2 Responses to A bit of Ole db provider 4.0

  1. cssathya says:

    Well, with Java you won’t really get this exception because it works regardless of whether the system is 32 bit or 64 bit 🙂


  2. vasya10 says:

    @cssathya: Yeah I wanted to mention the wora thingy, but left it out for humor 🙂


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: