Using DAO instead of ADO

C

Coleen

I have an Access 2000 database that was converted from Access 97. On one of
my users computers, her system was re-installed with Access 2000, and the
database has not worked correctly since that time. If I remember correctly,
we had to set up the computers for these users to use DAO over ADO. It's
been over two years since we did this, and (I hate to admit it - but) I've
forgotten to how to set up the DAO to take precedence over ADO. Can someone
please remind me? I thought it was part of the Add-ins, but when I go into
Add-in Manger, I have NO add-ins available. I've checked in the directory:
C:\Program Files\Microsoft Office\Office\Addins but I don't know which file
to select. Please help? I'm using Access 2000, Microsoft Office 2000.
TIA.

Coleen
 
A

Amy Vargo

Hi,

My name is Amy Vargo. Thank you for using the Microsoft Access Newsgroups.

You can create a new module or open and existing module in design view.
This will open the Visual Basic Editor window. Go to Tools, References. In
the list, move the reference for the Microsoft DAO Object Library anywhere
above the reference for the ActiveX Object Library. Save and close the
module.

This will make the DAO object library take precedence ove ADO.

I hope this helps! If you have additional questions on this topic, please
respond back to this posting.


Regards,

Amy Vargo
Microsoft Access Engineer


This posting is provided 'AS IS' with no warranties, and confers no rights.
You assume all risk for your use. © 2001 Microsoft Corporation. All rights
reserved.
 
D

Douglas J. Steele

You can change the precedence by moving the DAO reference higher in the list
than the ADO reference under Tools | References (only available when a code
module is open).

However, that's really not the best method. What you really should do is
disambiguate all declarations. Rather than

Dim rs As Recordset

you should use

Dim rs As DAO.Recordset

for a DAO recordset, or

Dim rs As ADODB.Recordset

for an ADO recordset.

The list of objects with the same names in the 2 models is Connection,
Error, Errors, Field, Fields, Parameter, Parameters, Property, Properties
and Recordset
 
C

Coleen

Thanks so much for your help. The problem with this database is that 1) I
didn't create it, and don't have the time to spend on it to "re-make" it
correctly, and 2) we are planning to incorporate what this database does
into a new application that we are building from scratch using .Net - so all
I need to do is "Maintain" it for a little while longer...

Thanks much for your instructions & advice :)

Coleen
 
D

david epsom dot com dot au

If the database has not changed, but the computer has changed, you
need to fix the computer, not the database.

Since you have re-installed Access 2000, the FIRST thing to check
is that you have applied Office and Jet service packs. The
first release of Access 2000 had a lot of problems.

(david)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top