![]() |
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 |
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 |
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 |
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 |
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. -- |
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 |
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 |
All times are GMT +1. The time now is 03:02 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com