Solved

Error MySql.Data.MySqlClient.MySqlConnection is not defined

Posted on 2011-03-15
3
478 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 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

11 Experts available now in Live!

Get 1:1 Help Now