VBA 101 - Which Object Library for ADO?

W

WDSnews

Ok. I've bought four books, read two of them, and just finished 3 credit
hours of VBA at the Community College. But I don't know the answer to this
fundamental question.... Which object library do I need to reference for
ADO to work?

When I compile my code I get this error:

"User-defined type not defined" ...

....at this point in my code:

Dim cnnCustomers As adodb.connection

I suspect I need one of the Microsoft Data Objects x.x Library modules. Is
that right? Which one? What could I read to understand which x.x to
choose?
 
T

Tony Toews [MVP]

WDSnews said:
I suspect I need one of the Microsoft Data Objects x.x Library modules. Is
that right? Which one? What could I read to understand which x.x to
choose?

A client is running Microsoft Activex Data Objects 2.5 in their
database.

Tony
 
W

WDSnews

wow. that was fast. thanks! I chose v2.8 and that seems to work.

Access now has five libraries selected. I wonder if I should disable one or
more of them?

Visual Basic for Applications
Microsoft Access 12.0 Object Library
OLE Automation
Microsoft ADO Ext. 6.0 for DDL and Security
Microsoft ActiveX Data Objects 2.8 Library
 
D

Dirk Goldgar

WDSnews said:
wow. that was fast. thanks! I chose v2.8 and that seems to work.

Access now has five libraries selected. I wonder if I should disable one
or more of them?

Visual Basic for Applications
Microsoft Access 12.0 Object Library
OLE Automation
Microsoft ADO Ext. 6.0 for DDL and Security
Microsoft ActiveX Data Objects 2.8 Library


For basic ADO operations, you probably don't need the ADO Extensions for DDL
& Security.
 
T

Tony Toews [MVP]

John W. Vinson said:
Microsoft ActiveX Data Objects x.xx Object Library

Use the highest version number.

I know nothing really about the ADO versioning. But I wonder if 2.8
is available on all, say, patched SP2 Windows XP systems or even Win
2000 patched systems.

Tony
 

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