Solved

Automation Error

Posted on 2002-07-03
11
380 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
  • 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
 
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 69

Expert Comment

by:Éric Moreau
ID: 7127000
have you re-register the DLL?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
z = x + y – 1 6 67
Excel object stays open 19 70
Excel VBA, find a string in a column, update a cell 7 65
SLMGR Switches Are Not Working On KMS Host 3 67
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

911 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now