Problems with ADODB

  • Thread starter Thread starter Eric Wescott
  • Start date Start date
E

Eric Wescott

I'm attempting to sue ADOBD to access my database via the ODBC driver.
However when I
Dim as400 As New ADODB.Connection

or
Dim as400
Set as400 = Server.CreateObject("ADODB.Connection")

I get a compiler error saying User defined type not defined. I'm using
Office 2000. I assume I need to install some sort of ADO addon but I'm
not sure where to find it. Could somebody please put me in the right
direction?

Thanks
Eric
 
Hi Eric,

Choose Tools/References from the Visual Basic Editor menu and put a
check mark beside the Microsoft ActiveX Data Objects 2.X Library, where X is
the highest number you see in the list

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *
 
Hi Eric

In the VBE; Tools > References, check Microsoft ActiveX Data objects 2.5 (or
whichever version that's installed).

HTH. Best wishes Harald
 
Eric,

you can also update to the latest versions by downloading MDAC2.8 and the
MDAC2.8 security patch from msdn.

a. MDAC2.8, is available here:
http://www.microsoft.com/downloads/...e3-c795-4b7d-b037-185d0506396c&DisplayLang=en

b. MDAC2.8 security update is available here:
http://www.microsoft.com/downloads/...E8-C14A-47B4-BFCC-87988E062D91&displaylang=en

c. MSXML4SP2 is available here.
http://www.microsoft.com/downloads/...2b-b4f2-46da-b4b6-c5d7485f2b42&displaylang=en

Robin Hammond
www.enhanceddatasystems.com
 
Choose Tools/References from the Visual Basic Editor menu and put a
check mark beside the Microsoft ActiveX Data Objects 2.X Library, where X is
the highest number you see in the list

But will early binding work where the late bound code

Dim as400
Set as400 = Server.CreateObject("ADODB.Connection")

didn't?

Jamie.

--
 
When i dont want to include the ADO reference via "References" i use th
following code into excel vba module:

DIM CONN AS OBJECT
DIM REC AS OBJECT
SET CONN = CREATEOBJECT(\"ADODB.CONNECTION\")
SET REC = CREATEOBJECT(\"ADODB.RECORDSET\")

CONN.OPEN \"DRIVER......\"
REC.OPEN \"SELECT * FROM TABLE;\", CON

Regards,
Rafael Porche
 
Also, the Server.CreateObject("ADODB.Recordset") command looks like i
comes from an ASP page. In excel vba, you would just us
CreateObject("ADODB.Recordset").
 

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

Back
Top