Solved

ADO reference issue in Excel 2010 with physical and virtual machines

Posted on 2011-09-08
6
227 Views
Last Modified: 2012-06-27
I have a spreadsheet with VBA that has a reference to the ADO 2.0 library.  The VBA opens a connection to a SQL Server database, executes a command, and stores it in a recordset.

If the code is executed and saved on a physical Windows 7/Excel 2010 machine, and then opened on a virtual Windows 7/Excel 2010 machine, the code will not run.  

The error is "Error occured while retrieving data from the database (Error #: 430 - Error Description: Class does not support Automation or does not support expected interface)"

However, if the ADO reference is changed from 2.0 to 2.x, saved, and then changed back to 2.0, it will work.  

Any possible reason a physical machine would cause this issue and a virtual would not?
0
Comment
Question by:rescapacctgit
  • 4
  • 2
6 Comments
 
LVL 16

Expert Comment

by:carsRST
ID: 36505662
The best I can guess is the path (in references) is different between the virtual machine and the physical machine.

That can be checked by opening in one environment vs the other and see if a reference is missing.
0
 

Author Comment

by:rescapacctgit
ID: 36506301
Normally we use virtual machines only for these files.  

Oddly enough after running on a physical machine, the reference doesn't appear broken.  The paths are the same:

C:\Program Files\Common Files\System\ado\msado.tlb.
0
 
LVL 16

Expert Comment

by:carsRST
ID: 36506344
You mentioned 2 different references (2.0 vs 2.x).  Same file path for both file references within the two different environments?
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 16

Expert Comment

by:carsRST
ID: 36506348
2.0 and 2. whatever will have different file names.
0
 
LVL 16

Accepted Solution

by:
carsRST earned 500 total points
ID: 36506393
0
 

Author Comment

by:rescapacctgit
ID: 36506487
Thank you, carsRST.  
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now