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

Class does not support automation error

Recently, three different clients' Access programs have randomly produced an error "Class does not support automation or does not support expected interface".  There seems to be no commonality - one is an Access 2003 adp that has been running successfully since 2005, one is a program we began testing in August (Windows 7, Access 2007), and the third is Access 2003 loaded on 15 different laptops - some XP, some Win 7.  The laptop program hasn't produced the error with the Win 7 computers but it doesn't produce the error on the all XP's either - or even consistently on any one of the XP computers.  With the most recent incident (the adp), a report they use often produced the error. It does populate a table through code, which is where I thought the problem suddenly developed (even though no changes have been made to that code in several years).  However, when I commented out the error handler (expecting to have it break on whatever was causing the error) - it ran without the error.  With the 2007 program, my client and I used it with no problem two days ago, but yesterday when he tried to enter more data, the error came up when he opened the program.  

I've Googled it but the answers seem to point to something involving MDAC - but I don't understand why it's so random, why commenting out the error handler caused it to NOT display the error, or what to do about it.  I can't reproduce it "on demand" - I have seen it once or twice on my computer a couple of months ago (Win 7 and I think it was Access 2003 when I saw it) but compact/repair and compiling made it quit, so I didn't get alarmed at that point.  That said, I'm not sure I can provide any sample that would reliably show the error.

At some point when this first started popping up (with the laptop program in September), I tried creating a new db and importing everything - but it still happens randomly.

Any ideas?  (Fingers crossed!!)  
0
KarenTaggart
Asked:
KarenTaggart
  • 4
  • 3
1 Solution
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
At a guess, your problem is most likely this:

http://blogs.technet.com/b/asiasupp/archive/2011/03/14/changes-in-mdac-adodb-com-components-in-windows-7-service-pack-1.aspx

  Basically Microsoft broke ADO.

  But what the error message is telling you is that what the app was compiled against lib's wise is different then what it is trying to run against, so it could be anything.  One thing for example that is giving folks headaches is that Office 2010 comes in 32 and 64 bit versions and you can't mix up the two on the same machine.

  So there are different fixes depending on what exactly the problem is.   I would suggest as a start taking a copy of the app  and /decompile it, or create a fresh DB from scratch and do that on an XP or non-SP1 Win7 machine and see if that clears it up.

  After that, it will be a lot of digging around looking at what libs your using and comparing versions from machine to machine.

Jim.

 

 
0
 
danaseamanCommented:
If you are compiling your apps on Win7 SP1 you may have problem where it runs on Win7 SP1 but not on Win7 w/o Service Pack or XP.
Microsoft broke compatibility for MDAC with Win7 SP1.
The workaround is to use a Microsoft TLB for MDAC in references section of your project.

After removing previous reference to MDAC you can add the TLB via References/Browse.

See these links for more info:
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Windows/Windows_7/Q_27284329.html
http://www.vbforums.com/showpost.php?p=4033019&postcount=7
http://support.microsoft.com/kb/2517589

Download 32-bit TLB here:
http://download.microsoft.com/download/6/4/3/64318ED2-7E18-4A5C-80E2-9BDA0DF02DB3/msado60_Backcompat_i386.tlb
0
 
KarenTaggartAuthor Commented:
JDettman - I no longer have an XP or non sp1 Win 7 computer, unfortunately.  And one of the progrms that got the error is a Win 7, sp1 computer.

danaseaman - I'm attaching the reference for the three program that have thrown the error - I don't see any MDAC references...?
AviationReferences-101411.JPG
0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
KarenTaggartAuthor Commented:
danaseaman  - oops... here are the other two:
 The 2003 adp on a server The one one on 15 laptops, Access 2003
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:

  All the "Microsoft Active X Data Object..." references are ADO and supported by MDAC.

Jim.
0
 
KarenTaggartAuthor Commented:
Thank you.  I'm tryin it on two of the programs and will monitor.  Just out of curiosity - any guess why just commenting out the error handling would have caused it to run without error?  
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
<<any guess why just commenting out the error handling would have caused it to run without error?   >>

 The other possibility is that you have corruption in the VBA project file.  You might want to try a /decompile (backup first) on the DB or create a fresh DB.

 Jim.
0
 
KarenTaggartAuthor Commented:
I am closing this question on the assumption that this solution will take care of the problem.  Since it is intermittent, I can't say for sure, but what danaseaman and JDettman said makes sense.  I very much appreciate the links to the work-around.  I've modified the 3 programs that have thrown the errors (so far) and compiled with no problem.  I can't reproduce the symptom "on demand" but I believe it's solved.  Thank you!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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