Solved

ADO reference issue in Excel 2010 with physical and virtual machines

Posted on 2011-09-08
6
229 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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

776 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