Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Problems with ADODB

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Problems with ADODB

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 *


"Eric Wescott" wrote in message
m...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 593
Default Problems with ADODB

"Rob Bovey" wrote ...

Dim as400 As New ADODB.Connection

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


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.

--
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problems with ADODB


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

--
locoloc
-----------------------------------------------------------------------
locoloco's Profile: http://www.excelforum.com/member.php...fo&userid=1551
View this thread: http://www.excelforum.com/showthread.php?threadid=26528

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problems with ADODB


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").



--
kkkni
-----------------------------------------------------------------------
kkknie's Profile: http://www.excelforum.com/member.php...nfo&userid=754
View this thread: http://www.excelforum.com/showthread.php?threadid=26528



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Problems with ADODB

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 Wescott" skrev i melding
m...
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



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default Problems with ADODB

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 he
http://www.microsoft.com/downloads/d...DisplayLang=en

b. MDAC2.8 security update is available he
http://www.microsoft.com/downloads/d...displaylang=en

c. MSXML4SP2 is available here.
http://www.microsoft.com/downloads/d...displaylang=en

Robin Hammond
www.enhanceddatasystems.com


"Eric Wescott" wrote in message
m...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ADODB Connection fi.or.jp.de Excel Worksheet Functions 0 September 9th 09 09:23 PM
0 with ADODB Recordset Stefen Percoco Excel Programming 1 July 8th 04 09:54 PM
adodb.recordset with excel nate axtell Excel Programming 14 June 11th 04 01:32 PM
ADODB Richard Mogy Excel Programming 3 May 6th 04 09:14 PM
ADODB Recordset Seth[_3_] Excel Programming 0 August 5th 03 02:15 PM


All times are GMT +1. The time now is 10:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"