Solved

Error 458

Posted on 2001-09-06
7
692 Views
Last Modified: 2012-05-04
I have created a VB 6.0 Application that works fine on Windows ME, windows 98 and Windows 2000.  When I try to install it on Windows NT, I get the following error when opening a form that uses Access 2000 automation:

Run-time error Error 458
Variable uses an Automation type not supported by Visual Basic

Any help with this issue would be greatly appreciated.

Thanks!
0
Comment
Question by:hbickings
7 Comments
 
LVL 4

Expert Comment

by:Jeremy_D
ID: 6460590
My guess would be that Access 2000 is not installed on the target NT system...
0
 
LVL 15

Expert Comment

by:lyonst
ID: 6460593
Hi,

This might help..

http://support.microsoft.com/support/kb/articles/Q170/1/64.ASP

Passing User-Defined Types to Procedures
With Visual Basic 6.0 it is possible to pass a user defined type (UDT) as an argument to a procedure or function. However, there is a restriction. Passing a UDT to a procedure in an out-of-process component or across threads in a multi-threaded component requires an updated version of DCOM for Windows 95 and Windows 98, or Service Pack 4 for Windows NT 4.0. This update is required on your development computer as well as on any computer that will run your application. A run-time error will occur if the required files are not installed.

The above does not apply to passing UDTs within a single-threaded application; this will work without updating. The Package and Deployment Wizard will not determine the dependencies for the necessary components - it is up to you to make sure that the files are on the end user's computer. You can test for the existence of the components by trapping for run-time error 458 - "Variable uses an Automation type not supported in Visual Basic". If this error occurs, the DCOM or Service Pack components must be updated; the update procedure differs depending on the operating system:

Windows 95 or Windows 98

DCOM98.EXE is a self-extracting executable that installs the updated DCOM components for Windows 95 or Windows 98. It can be found in the DCOM98 directory of the Visual Basic 6.0 CD. This file may be freely distributed with your Visual Basic application.


Windows NT 4.0

The updated DCOM components are automatically installed with Service Pack 4 (SP4). When it is released, you can download the Service Pack from the Microsoft Web site.

Cheers,

T.
0
 
LVL 1

Expert Comment

by:jtjcomp
ID: 6460598
You may be missing the Access 2000 support files,  these files are sometimes provided by win 2000, me, 98.  Try to include the MDAC_TYP.exe in your install routine.

JTJComp
0
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
LVL 1

Expert Comment

by:jtjcomp
ID: 6460601
You may be missing the Access 2000 support files,  these files are sometimes provided by win 2000, me, 98.  Try to include the MDAC_TYP.exe in your install routine.

JTJComp
0
 
LVL 1

Expert Comment

by:sanjeevjain1973
ID: 6462749
Not everyvariable that appears in atype library orobject  
library can be used by every programming language.
This error has the following cause and solution:

You tried to use a variable defined in a type library or object library that has adata type that isn't supported by Visual Basic.
You can't use a variable of a type not recognized by Visual Basic in a Visual Basic program.


Sanjeev
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7207702
Hi hbickings@devx,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Save as PAQ -- No Refund.
    *** good suggestions; no rsponse to indicate which solved the problem.

hbickings@devx, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 7241026
Per recommendation, points NOT refunded and question closed.

Netminder
CS Moderator
0

Featured Post

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
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…

773 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