Solved

Error MySql.Data.MySqlClient.MySqlConnection is not defined

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

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
creating a flowchart from an algorithm 5 30
Get Reply from SSIS to intranet site when finished 3 33
Server Error 11 47
Why is some text in blue in Visual Studio? 6 22
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
A short film showing how OnPage and Connectwise integration works.
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

932 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

12 Experts available now in Live!

Get 1:1 Help Now