Solved

Error MySql.Data.MySqlClient.MySqlConnection is not defined

Posted on 2011-03-15
3
484 Views
Last Modified: 2012-05-11
Hi,

I am trying to upgrade my connection from ODBC to MySql Connector/NET and I am getting this error message:

MySql.Data.MySqlClient.MySqlConnection is not defined

I have added the name space so i am confused by this error.

Could it be that I have an older version of IIS and this namespace is not on my developemnt PC?

Thanks
0
Comment
Question by:j-w-thomas
[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
  • 2
3 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 500 total points
ID: 35137752
Did you add a reference to the dll ?
Did you add the using or import-statement on top of your class, page, ...

The steps that you need to take are as follows....

1) Install the MySql Connector
2) Add a reference to the MySql.Data.dll in your project
3) Add either a using or Import Statement to your code
4) From there you should be able to reference the MySql objects.

0
 
LVL 3

Author Comment

by:j-w-thomas
ID: 35137813
step

1) done
2) not sure how to do that. I did not do that for the ODBC version, can you help?
3) I added the import on the page and in the config file

can you help with the .dll reference?
0
 
LVL 3

Author Comment

by:j-w-thomas
ID: 35137914
Actually i think that i have got it, I added a bin folder to my app and added the MySql.Data.dll file to it.

I was also looking on this website for help too.

http://www.15seconds.com/issue/050407.htm

Thanks Dhaest!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

739 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