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

Automation Error

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
afterburner
Asked:
afterburner
  • 4
  • 3
  • 2
  • +2
1 Solution
 
chops123Commented:
Can you paste the exact error.

What does the program do ?

KC
0
 
afterburnerAuthor Commented:
>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
 
marconovaroCommented:

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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
chops123Commented:
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
 
Éric MoreauSenior .Net ConsultantCommented:
have you re-register the DLL?
0
 
afterburnerAuthor Commented:
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
 
bruintjeCommented:
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
 
bruintjeCommented:
and don't forget a reboot after the register action
0
 
chops123Commented:
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
 
afterburnerAuthor Commented:
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
 
afterburnerAuthor Commented:
Good stuff.
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

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