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
C:\User\<User>\AppData\Local\Temp\<some_random_number>.rpt:
Failed to load database information.

Below is a preview of the Exception:

crdb_doa.dll_x86error

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!

 

VSAchievements

Visual Studio Achievements
abhilashca (132 Points)
  • Don't Try This At Home
    • Magic Numbers
      Magic Numbers (0 Points)
      Write a enum with 30 fields. Who needs numbers when you've got words! Uses FxCop
      3 days ago
    • Overload
      Overload (0 Points)
      More than 10 overloads of a method. You could go with this or you could go with that. Uses FxCop
      Wednesday, February 13, 2013
    • Go To Hell
      Go To Hell (0 Points)
      Use of the goto keyword. Um, I heard it was a best practice that you weren't supposed to do that anymore.
      Friday, January 04, 2013
    • Scroll Bar Wizard
      Write a single line of 300 characters long. Who needs carriage returns? Uses FxCop
      Thursday, December 27, 2012
  • Power Coder
    • Time For An Upgrade
      A solution takes 10 minutes to compile. Dag, that's one enormous solution!
      Friday, May 03, 2013
    • Suspicious
      Suspicious (10 Points)
      Use 5 preprocessor directives. Compiler commands -- aren't you fancy!
      Friday, February 22, 2013
    • Equal Opportunist
      Equal Opportunist (10 Points)
      Write a class with public, private, protected and internal members. It's all about scope. Uses FxCop
      Monday, January 21, 2013
    • On The Shoulders of Giants
      Reference 25 assemblies. Hey, why should you write it if someone else already did?
      Tuesday, January 08, 2013
    • Localization Guru
      Localization Guru (10 Points)
      Have 1000 localized values. Nice localization work!
      Thursday, January 26, 2012
  • Just For Fun
    • Save A Tree
      Save A Tree (5 Points)
      Print source code. My boss told me to. I swear!
      Monday, March 04, 2013
    • Obsessive Compulsive Disorder (OCD)
      Invoke the 'Close All But This' menu option 10 times. I mean, who invented those damn tabs anyway?
      Sunday, February 26, 2012
    • Lonely
      Lonely (5 Points)
      Code on a Friday or Saturday night. Coding? Tonight? Ouch.
      Saturday, February 04, 2012
    • Install and Register For Visual Studio Achievements
      Install the add-in and register with Channel9. You are up and running!
      Sunday, January 22, 2012
  • Windows 8
  • Unleashing Visual Studio
    • The Explorer
      The Explorer (5 Points)
      Start a debug session using step into (F11) more than 10 times. Ah, the power of F11. Every coder's best friend.
      Monday, February 27, 2012
    • Casual Observer
      Casual Observer (5 Points)
      Start a debug session using step over (F10) more than 10 times. I thank the debugger every day.
      Saturday, February 11, 2012
  • Good Housekeeping
    • Regional Manager
      Regional Manager (7 Points)
      Add 10 regions to a class. Your code is so readable, if I only didn't have to keep collapsing and expanding!
      Thursday, February 02, 2012
  • Customizing Visual Studio
    • Extensions Junkie Deluxe
      Install 10 extensions to Visual Studio. How can you find anything on a menu?
      Sunday, January 22, 2012
    • Extensions Junkie
      Install 5 extensions to Visual Studio. Extensibility rocks!
      Sunday, January 22, 2012

Month List

Tag cloud