Solved

ADO reference issue in Excel 2010 with physical and virtual machines

Posted on 2011-09-08
6
232 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

733 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