Solved

Automation Error

Posted on 2002-07-03
11
383 Views
Last Modified: 2007-12-19
Hello

Someone gave me a working VB5 prog that had been compiled and worked fine.

I had to add a few lines to it, and so mirrored it on a working machine to add the code and then test it. The test worked fine.

The altered programme was then moved to the "live" location and run from there. An error message "Automation Error" and a long (smthg like -2120000456") displayed. So it failed. The added code was just vanilla variable processing, in a few loops. How come it runs on the test machine, but not on the live location, and what is and what is causing the Automation Error.

Urgent answer would be great. Thanks.
0
Comment
Question by:afterburner
[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
  • 3
  • 2
  • +2
11 Comments
 
LVL 2

Expert Comment

by:chops123
ID: 7126672
Can you paste the exact error.

What does the program do ?

KC
0
 

Author Comment

by:afterburner
ID: 7126721
>Can you paste the exact error.

Well the EXACT error is not to hand at the moment in terms of the number that is returned, but I assume by the way you ahve asked the question that this is relevant. The nearest I can get at the moment is "Automation Error - -212xxxxxxx", and I am saying that if the "xxxxx" part of that is relevant to you then I will have to go run the prog again. Let me know.

>What does the program do ?

That is a long story for sure, sorry to say. Essentailly it's a parser.

KC
0
 
LVL 6

Expert Comment

by:marconovaro
ID: 7126753

The "xxxx" part is for sure relevant. This should help to find the meaning of the error, and so to resolve it.
You can have a look to:

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q186063

to know how to "translate" this error.
Let me know...
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 2

Expert Comment

by:chops123
ID: 7126756
Well why I asked was because it needs to be known if the error is a trappable error or not. Automation error can occur due to various reasons. The error number you specified is not a trappable error. so you wont find any documentation on it as well.

The cause of automation errors are usually due to version compatibility in active-x components on different machines.

What are the active-x components being referenced in your application.

KC
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7127000
have you re-register the DLL?
0
 

Author Comment

by:afterburner
ID: 7127077
Guys

The actual error is:

QUOTE

Run Time Error
-2147024894 (80070002)
Automation Error

UNQUOTE

The ocx's etc being reffd are:
MSCOMCTL.OCX
COMDLG32.OCX
COMCT232.OCX
MSCAL.OCX
 and
WSHOM.OCX
MSSCRIPT.OCX

all of them have the same version number as the controls used on the original machine used for compiling, EXCEPT for the last one - MSSCRIPT.OCX. The original machine version is earlier than the one I compiled with.

So ... I tried getting the earlier one across of course. But I cant copy anything into my WINNT System32 directory. Even when I switch all security to full for the directory, copying a file to it simply bounces back to the old one.

0
 
LVL 44

Expert Comment

by:bruintje
ID: 7127590
you can try an unreg with

-close all programs running
-regsvr32 /u c:\path\dll
-then rename the newer one
-then paste the older one
-do a regsvr32 for the older one

:O)Bruintje
0
 
LVL 44

Expert Comment

by:bruintje
ID: 7127603
and don't forget a reboot after the register action
0
 
LVL 2

Accepted Solution

by:
chops123 earned 100 total points
ID: 7127716
According to MSDN,Run Time Error -2147024894 (80070002)Automation Error indicates that "The System cannot find the specified file". This implies that one of the DLL that you are referencing may not be present on the machine that it is running on.

Why dont you debug the program on the machine where you are getting the error.Since you mentioned that MSCRIPT.OCX (Micrsoft Script Control) has some version issues,you can try replacing the same by the newer one available on the other machine.Do not delete the old DLL,simply rename it first.In case the DLL is being used by some other process,restart the machine and then follow the procedure mentioned above.Register the DLL again and try.

Regards
KC

0
 

Author Comment

by:afterburner
ID: 7130071
Guys

The automation error in this case meant that it couldnt find a whole app that the prog was calling through a shell, since the path to it was wrong.

The main contribution that helped me wth this was

>> ........ indicates that "The System cannot find the specified file".

So thanks chops123!!
0
 

Author Comment

by:afterburner
ID: 7130072
Good stuff.
0

Featured Post

Technology Partners: 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!

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

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