Solved

Error MySql.Data.MySqlClient.MySqlConnection is not defined

Posted on 2011-03-15
3
480 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
  • 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

777 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