Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 807
  • Last Modified:

Could not load file or assembly 'ADODB......

Hi!

Have made a complete setup.exe in Visual Studio 2008 (windows vista)

And have installed this app on my Windows XP PC.

But when i start the app, i get this error message:

Could not load file or assembly 'ADODB, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified

What is going on here ?

Please help ASAP.

Thanks
0
team2005
Asked:
team2005
  • 5
  • 2
1 Solution
 
TimCotteeCommented:
Hello team2005,

You have not included the relevant assemblies to allow you to use the ADODB objects. These are legacy objects which in theory can be used in .NET though it is certainly not recommended. Depending on how complicated your application is I would seriously consider upgrading it to use the newer constructs and objects instead of importing the legacy VB6 type objects.

Regards,

TimCottee
0
 
team2005Author Commented:
Hi!

Can you explane what you meen....

0
 
TimCotteeCommented:
team2005,

In VB6 we used to use the objects:

ADODB.Connection / ADODB.Recordset etc and these are part of the Microsoft Data Access Components (MDAC) which give a unified approach to database access.

VB.Net takes this a step further and the .Net framework includes ADO.NET objects which have similar functionality but are built-in to the framework itself rather than relying on the additional components.

I am assuming that your application has been upgraded from a VB6 app which used these older methods. VB.Net provides legacy methods in the Microsoft.VisualBasic namespace which will allow these objects to be used in a .NET application, however you do need to ensure that you have the relevant MDAC installed along with the Interop assemblies that provide a connection between the .Net framework objects and the underlying legacy objects.

For the sake of simplicity you should upgrade the application completely and avoid using these legacy objects, rather use the System.Data.SqlClient namespace and contained objects which use the framework methods exclusively.

TimCottee
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!

 
team2005Author Commented:
Hi!

I am using MYSQL in my app.
Isent System.Data.SqlClient for MS SQL ?

0
 
grayeCommented:
Hang on... it's not that complicated.

Just click on the ADODB reference in your solution, and change the CopyLocal property to True
0
 
team2005Author Commented:
Hi!

Can't find out where to set that ???
0
 
team2005Author Commented:
Hi!

Found it. And tryed to do what you say.

And ---> YES Woorking now.

Thanks for BIG HELP
0
 
team2005Author Commented:
Exelent.. Thanks alot
0

Featured Post

Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

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