The database DLL ‘crdb_dao.dll’ could not be loaded


Last day one of my friend pinged me to troubleshoot an Exception thrown while loading the Crystal Report in his Windows Form Application. The Exception is as follows:

Failed to load Database information Details: The database DLL ‘crdb_doa.dll’ could not be loaded.
Error in File
Failed to load database information.

Below is a preview of the Exception:


So, What is crdb_dao.dll ?

crdb_doa.dll is a Crystal Reports database driver for Microsoft Data Access Objects. This driver allows the Crystal Report Viewer to connect to the Microsoft Access Objects (i.e.; MS Access 2003) database.

Then, What caused the Exception?

The deployed environment was like this:

  1. OS Version : x64 (64-bit) Windows 7
  2. Database    : MS Access 2003
  3. Build Type : Any CPU

Here, the Project was build to run on Any CPU, i.e., for both x86 (32-bit) and x64 (64-bit) machine.

Unfortunately, The MS Access 2003 uses Jet Database Engine 4.0 driver, which has been deprecated and is only available in x86 (32-bit) flavor. That means, x64 (64-bit) flavor is not available. Another tip is, the Jet Database Engine 4.0 has not undergone any major revision since 2000. That means, the driver comes with MS Access 2003 is same as what we’ve in year 2000. Take a look at Data Access Technologies and Road Map in MSDN for more details.

Well, How can I Solve?

The solution is straight forward.

  1. Open your existing Project Solution in Visual Studio
  2. Set the Build mode to Release
  3. Change the CPU Configuration from Any CPU to x86 
  4. Re-Build the Project
  5. That’s it. Now, Deploy the application

You are done!