Adodb Automation Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings adodb recordset automation error and policies of this site About Us Learn more about Stack Overflow excel vba adodb connection automation error the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation run time error 2147217843 80040e4d Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it adodb connection automation error only takes a minute: Sign up ADODB connection from VBA stopped working up vote 7 down vote favorite 2 We've got an Exccel spreadsheet used to manage the rota for the out of hours support engineers. A while back, I added a bit of VBA code which automatically diverts the support phone numbers to the engineer's phone out of hours.
Run Time Error 80040e14
It does this by connecting to a database run by the phone providers, and updating the divert number. This afternoon, it is suddenly not working on the central server: Dim Db As ADODB.Connection Sub ConnectDatabase() Set Db = New ADODB.Connection Db.Open "SupportMobileDb" End Sub The code stops at the New ADODB.Connection line, and reports: Run-time error '430': Class does not support Automation or does not support expected interface I can still run the macro on my laptop, and it works correctly. And on the central server, I can still use Excel, and connect to the datasource correctly. It just won't work through VBA any more on this server. The macro ran correctly at 9am and diverted all the phones to the office, but the 5pm divert to staff macro didn't work. I can't see that Windows was updated today, or really any other changes at all. Has anyone seen this problem before? excel vba adodb share|improve this question asked Oct 7 '11 at 17:15 asc99c 2,67521744 add a comment| 3 Answers 3 active oldest votes up vote 1
Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create
Vba Copyfromrecordset Class Does Not Support Automation
a Freelance Project Hire for a Full Time Job Ways to run time error 2147467259 (80004005) Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services vba runtime error -2147467259 (80004005) Groups Website Testing Store Headlines Experts Exchange > Questions > Automation Error, Unspecified Error when opening ado recordset Want to Advertise Here? Solved Automation Error, Unspecified Error when opening http://stackoverflow.com/questions/7690608/adodb-connection-from-vba-stopped-working ado recordset Posted on 2007-11-19 MS Access Query Syntax 1 Verified Solution 7 Comments 2,050 Views Last Modified: 2010-05-18 I'm running a query and get the error in the subject line above. This is the query: strSQL = "SELECT XL_Import.Gate, XL_Import.Region, XL_Import.Section, XL_Import.[Charter Fields], " & _ "XL_Import.[Data Value], XL_Import.[Matrix 1 Table], XL_Import.[Matrix 1 https://www.experts-exchange.com/questions/22970689/Automation-Error-Unspecified-Error-when-opening-ado-recordset.html Attribute] " & _ "FROM XL_Import " & _ "WHERE (XL_Import.Section = 'DF" & x & "') AND (XL_Import. [Data Value]<>'0') AND " & _ "(XL_Import.[Matrix 1 Table]= 'ProductOption') AND (XL_Import. [Matrix 1 Attribute] ='package direction');" If I paste this into an accesss query it runs fine. Any ideas what is going on? I'm using Access 2003. 0 Question by:ecohouse Facebook Twitter LinkedIn Google Best Solution byecohouse Thanks for the quick response. I was able to figure out the problem. It turns out that in this line: (XL_Import.Section I needed to put brackets around the word section. to make it look like this: Go to Solution 6 Comments LVL 27 Overall: Level 27 MS Access 20 Query Syntax 10 Message Expert Comment by:MikeToole2007-11-19 The SQL looks OK, can you post the rest of your ADO code? 0 Message Accepted Solution by:ecohouse2007-11-19 Thanks for the quick response. I was able to figure out the proble
here for a quick overview of the site Help Center Detailed answers to any questions you http://superuser.com/questions/987435/vba-automation-error-when-querying-database-through-odbc might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Super User Questions Tags Users Badges Unanswered Ask Question _ Super User is a question and answer site for computer enthusiasts and power automation error users. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top VBA Automation error when querying database through ODBC up vote 1 down vote favorite I am trying to run Excel macro to run time error query some data from my ODBC database. My database details are as below: DSN: sgdv UID:l8qc1 Password:l8qc1 server:sgdv I am trying to query the data from the database but the VBA shows the error as below for the line Connection.Open "DSN=sgdv". Run-time error -2147217843 (80040e4d) Automation error I can't identify the error. Please help. Below is my code Sub ReadDB() Dim mainWorkBook As Workbook Dim intRowCounter Set mainWorkBook = ActiveWorkbook intRowCounter = 2 mainWorkBook.Sheets("Sheet2").Range("A2:Z100").Clear Set Connection = CreateObject("ADODB.Connection") Connection.Open "DSN=sgdv" strQuery = "SELECT * FROM DEDICT01 where DEDICT01.SER_SN='Z1E80R4C'" Set resultSet = Connection.Execute(strQuery) Do While Not resultSet.EOF mainWorkBook.Sheets("Sheet2").Range("A" & intRowCounter).Value = resultSet.Fields("DEDICT01.CUST_PARTS_NO").Value resultSet.movenext Loop resultSet.Close End Sub I have modified the program and my new coding is Sub ReadDB() Dim mainWorkBook As Workbook Dim intRowCounter Set mainWorkBook = ActiveWorkbook intRowCounter = 2 mainWorkBook.Sheets("Sheet2").Range("A2:Z100").Clear Set Connection = CreateObject("ADODB.Connection") Connection.ConnectionString = "DSN=sgdv;UID=l8qc1;PWD=l8qc1;" Connection.Open strQuery = "SELECT * FROM DEDICT01 where DEDICT01.SER_SN='Z1E80R4C'" Set resultSet = Connection.Execute(strQuery) Do While Not resultSet.EOF mainWorkBook.Sheets("Sheet2").Range("A" & intRowCounter).Value = resultSet.Fields("DEDICT01.CUST_PARTS_NO").Value resultSet.movenex