Windows: The ‘Microsoft.ACE.OLEDB.12.0’ provider error

Usually in Windows Server 2008 R2 or any related Windows operating system which run on 64bit, you might facing following error if you want to run some applications:

Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.
 
Object reference not set to an instance of an object.
The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.

Or in the screenshot version as below:

What you need to do to solve this problem is:

1. Download the Microsoft Access Database Engine 2010 Redistributable 64bit at here. Download the correct version which is “AccessDatabaseEngine_x64.exe”.

2. Uninstall the older version of Microsoft Access Database Engine (usually the version of 2007). Go to:

Control Panel > Add/Remove Program > Microsoft Access Database Engine 2007 > Right click > Uninstall

3. Install the one that we just download. This installation should install the latest OLE DB and ODBC version 14.0 (during this time) where you can check at:

Control Panel > System and Security > Administrative Tools > Data Sources (ODBC) > Drivers

Done. Even though the version is higher, this ODBC and OLEDB driver are backward compatible. You can try to re-run back the application and the error should disappear at this moment. Cheers!