Error 1706 - No valid source could be found for DAO

  • Thread starter Thread starter Studly Gearhead
  • Start date Start date
S

Studly Gearhead

After a repartition and format, I installed XP SP2 clean. Then I installed
Office 2000 plus the service pack and all updates.

Then I opened an application I wrote some time ago and get this error message
that I didn't use to get. A simple Set db = CodeDb() statement triggers it, but
it opens the database and works like it should. It appears that DAO really is
already installed.

I did make sure to select "run everything from HD" at install time, and made
sure the office CD is in the drive thinking that might fix it.

Can't install the latest MDAC since it says I don't need it.

Anyone else experience this? I suspect it's something simple but I'm not seeing
it. I plan to rewrite it using ADO, but I don't want to do that right now.

Thanks for any suggestions,

SG
 
After a repartition and format, I installed XP SP2 clean. Then I installed
Office 2000 plus the service pack and all updates.

Then I opened an application I wrote some time ago and get this error message
that I didn't use to get. A simple Set db = CodeDb() statement triggers it, but
it opens the database and works like it should. It appears that DAO really is
already installed.

I did make sure to select "run everything from HD" at install time, and made
sure the office CD is in the drive thinking that might fix it.

Can't install the latest MDAC since it says I don't need it.

Anyone else experience this? I suspect it's something simple but I'm not seeing
it. I plan to rewrite it using ADO, but I don't want to do that right now.

Thanks for any suggestions,

SG

I meant to say Office 2003, not office 2000.

SG
 
Sounds like a references problem.

Try this sequence:

1. In your database, open a code window, and choose References from the
Tools menu.

2. Uncheck the box beside Microsoft DAO 3.6 Library. Also uncheck any other
libraries you are not actually using. (You may end up with just the 2
required libraries checked: Access and VBA.)


3. Close Access.

4. Open a Windows command prompt, typically:
Start | Programs | Accessories | Command Prompt

5. Use regsvr32 to unregister the DAO libraray:
regsvr32 /u "c:\program files\common files\microsoft
shared\dao\dao360.dll"

6. Register the libaray again:
regsvr32 "c:\program files\common files\microsoft
shared\dao\dao360.dll"

7. Open your program, open the code window, and select the MS DAO 3.6
library again.

For more info on the libraries for different versions of Access, see:
Solving Problems with Library References
at:
http://allenbrowne.com/ser-38.html

BTW, there is no point at all in wasting your life re-writing this app using
ADO. DAO is the library specifically designed for Access, and the best
choice if your data is stored in Access (JET) tables. ADO is already dead
(replaced by ADO.NET, which is quite different.)
 
On Sat, 25 Jun 2005 10:41:33 +0800, Allen Browne wrote:

Worked like a charm! Thank you very much!!

One thing that I noticed that looked strange to me, that I thought I would pass
along just in case you encounter this again (and feel it's relevant) is an entry
in the Add/Remove programs control panel simply named "DAO" that was apparently
made by some software associated with my ATI All-In-Wonder Pro video card that
was installed before office was. Perhaps that did something funky to the
registry.

Thanks again,

SG
 
Back
Top