Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 24, 2012 11:55 PM by Andy22
Member
231 Points
93 Posts
Feb 24, 2012 09:55 PM|LINK
Hi Folks,
I'm using MySQL with Asp.net for the first time. I'm trying to simply open the connection to the DB.
However I'm getting the error that MySQLData cannot be found and therefore MySQLConnection is undefined.
I did add references to MySql.Data.dll & MySql.Web.dll v4.0....
Any ideas why it would still not show up even after the references where added...?
I'm also importing the namespace in the code: <%@ Import Namespace="MySQL.Data" %>
Regards, Andy
215 Points
52 Posts
Feb 24, 2012 10:15 PM|LINK
I tried createing MySQLConnection in ASP MVC 2 application and It worked for me.
I imported <%@ Import Namespace="MySql.Data.MySqlClient" %> after adding MySql.Data.dll reference. Then I was able to create the connection.
Feb 24, 2012 11:55 PM|LINK
I referenced the DLLs in the MySQL folder and not in my bin folder... The DLLs had to be in the Bin.
Andy22
Member
231 Points
93 Posts
MySQL.Data cannot be found..?
Feb 24, 2012 09:55 PM|LINK
Hi Folks,
I'm using MySQL with Asp.net for the first time.
I'm trying to simply open the connection to the DB.
However I'm getting the error that MySQLData cannot be found and therefore MySQLConnection is undefined.
I did add references to MySql.Data.dll & MySql.Web.dll v4.0....
Any ideas why it would still not show up even after the references where added...?
I'm also importing the namespace in the code:
<%@ Import Namespace="MySQL.Data" %>
Regards,
Andy
- Benjamin Franklin
Please mark as anwser if my post helped you!
vckreddyece
Member
215 Points
52 Posts
Re: MySQL.Data cannot be found..?
Feb 24, 2012 10:15 PM|LINK
I tried createing MySQLConnection in ASP MVC 2 application and It worked for me.
I imported <%@ Import Namespace="MySql.Data.MySqlClient" %> after adding MySql.Data.dll reference. Then I was able to create the connection.
Andy22
Member
231 Points
93 Posts
Re: MySQL.Data cannot be found..?
Feb 24, 2012 11:55 PM|LINK
I referenced the DLLs in the MySQL folder and not in my bin folder...
The DLLs had to be in the Bin.
- Benjamin Franklin
Please mark as anwser if my post helped you!