Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding the DAO library.... 1

Status
Not open for further replies.

Pesteo

Programmer
Feb 3, 2003
17
0
0
US
I am working with access....and trying to declare a database variable using...

Dim db as database

but there is no database option, how do I add the DAO library so that this option will exist....

Thanks,
Pesteo :)
 
Set a reference to the DAO library (Project References). If you can't find it on the list, you have a bit of a problem which I can help you with.

Bob Rodes
 
Thanks for the help, that worked great....

Now just because I'm inquisative, how would you hve added that library if it was not there in the first place?

 
How much time you got? :)

Seriously, there can be 3 problems:

1. You don't have the dao file in your system. For example, for DAO 3.6, you need a file called dao36.dll. If you don't have it, you have to find it and put it on your machine, typically in the winXXXX\system32 directory.
2. You have the file, but it isn't registered. You have to register it. The wirehead way to do that is to use regsvr32.exe. Read up on it if you're interested.
3. It is registered, but for some reason isn't showing in the references file. You can browse to it and select it that way, or probably unregister it and reregister it. (regsvr32 /u "mypath\myfile" will unregister, omitting the /u switch will register).

Bob Rodes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top