• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 245
  • Last Modified:

ADO reference issue in Excel 2010 with physical and virtual machines

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
rescapacctgit
Asked:
rescapacctgit
  • 4
  • 2
1 Solution
 
carsRSTCommented:
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
 
rescapacctgitAuthor Commented:
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
 
carsRSTCommented:
You mentioned 2 different references (2.0 vs 2.x).  Same file path for both file references within the two different environments?
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
carsRSTCommented:
2.0 and 2. whatever will have different file names.
0
 
rescapacctgitAuthor Commented:
Thank you, carsRST.  
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now