Solved

"Unable to initialize DAO/Jet db engine" error from CDaoDatabase() class

Posted on 2006-07-11
13
2,779 Views
Last Modified: 2012-08-14
Not sure if this is an ACCESS question or a programming question but I'll start here...

I have a MS Access database, db.mdb, that is accessed by a C++/MFC program using the CDaoDatabase class as such:

      CDaoDatabase *pDatabase = new CDaoDatabase();
      pDatabase->Open("C:\\<some_path_to_the_folder>\\db.mdb");

      CDaoRecordset rs(pDatabase);

It's worked fine for months, perhaps years.  But today it's started reporting a dialog that says:

"Unable to initialize DAO/Jet db engine"

when the line:

      pDatabase->Open("C:\\<some_path_to_the_folder>\\db.mdb");

is executed.  Not sure what's going on or what has changed but I'm baffled.  As far as I can tell, Access itself runs normally on this database.  So I suspect it's some issue with DAO but I'm not sure how to fix it.

This is running on XP SP2 and I tried to install the MDAC 2.8 SP1 but get an error that says:

"This setup does not support installing on this operating system"

Ok, I think that because XP SP2 INCLUDES MDAC 2.8 and will not install again.  I did try installing MDAC 2.7 but that didn't seem to make any difference.
0
Comment
Question by:jhance
  • 5
  • 4
  • 4
13 Comments
 
LVL 39

Expert Comment

by:stevbe
ID: 17081879
is it only on one machine?
if so I think we can find the list of files you may need to unregister / re-register.

Steve
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 17081883
DAO is part of the Jet engine not the MDAC since about MDAC 2.5
0
 
LVL 32

Author Comment

by:jhance
ID: 17081943
This is a one-off application.  So yes, it's only on one machine.


jimpen,

Ok, so DAO is a part of the Jet engine.  Any suggestions on how to fix this?
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 17081960
0
 
LVL 39

Expert Comment

by:stevbe
ID: 17081974
right ... dao is part of the OS and not MDAC so it could have been installing XP SP2

this KB talks about 95 but I think the register part still applies
http://support.microsoft.com/kb/q177264/

Regsvr32.exe C:\progra~1\common~1\micros~1\dao\dao360.dll
0
 
LVL 32

Author Comment

by:jhance
ID: 17082004
jimpen,

When installing the KB you suggested I get:

KB829558 Setup Error

Setup has detected that the Service Pack version of this system
is never than the update you are applying.

There is no need to install this update.
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 32

Author Comment

by:jhance
ID: 17082022
stevbe,

I did:

Regsvr32.exe C:\progra~1\common~1\micros~1\dao\dao350.dll

on my system and got the message that it was successfully registered.  Unfortunately, the problem remains.
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 17082041
Ok.  Then follow stevbe's suggestion for the regsvr32.
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 17082064
Does C++ have its own DAO dll of some sort?
0
 
LVL 32

Author Comment

by:jhance
ID: 17082175
I don't know, if there is, it's not obvious.
0
 
LVL 39

Accepted Solution

by:
stevbe earned 500 total points
ID: 17082328
Sorry, that dao350.dll was for 95, please re-register dao360.dll (that is the latest and greatest)
0
 
LVL 39

Expert Comment

by:stevbe
ID: 17082333
should be in ...

C:\Program Files\Common Files\Microsoft Shared\DAO
0
 
LVL 32

Author Comment

by:jhance
ID: 17082504
That did it...  Thanks!@!
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now