We help IT Professionals succeed at work.

Cannot connect to MySQL from VS2008 (.NET Framework 2.0) ASP.NET

I downloaded and installed the mysql connector/net. from http://dev.mysql.com/downloads/connector/net/1.0.html

And in the project, add reference to MySql.Data
then add "using MySql.Data.MySqlClient;"

But I get error in compilation at the line  "using MySql.Data.MySqlClient;" in VS2008 C#.

I have attached screenshot.
Will appreciate any help.
Thanks, screen
Comment
Watch Question

Fixer of Problems
Most Valuable Expert 2014
Commented:
Or you can use use the built-in OleDB connection. Connection string as such:

Just add reference of oledb connector
Provider=MySQLProv;Data Source=mydb;User Id=myUsername;Password=myPassword;

Author

Commented:
I went through step by step at http://www.codeproject.com/KB/cs/CsharpAndMysql.aspx
and it worked after I removed and re-added the MySql.Data reference.
Thank you all.
Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Commented:
You're welcome.