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
java.lang.YouFixedItLastTimeException

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