I received the following error The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine' in my 64-bit machine, Windows 2008 R2 when I ran by windows application.
But the same code was working fine in 32-bit machine.
There is no 64-bit Microsoft.Jet.OLEDB Provider.
We need to forcibly build the application to 32-bit.
Goto Build ->Project Properties
Under the Compile Tab ->Click Advanced Compile Option..
Set Target CPU to x86 instead of Any CPU