locked
MySQL.Data cannot be found..? RRS feed

  • Question

  • User102459681 posted

    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 

    Friday, February 24, 2012 5:55 PM

Answers

  • User-1811612959 posted

    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.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 24, 2012 6:15 PM
  • User102459681 posted

    I referenced the DLLs in the MySQL folder and not in my bin folder...
    The DLLs had to be in the Bin. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 24, 2012 7:55 PM

All replies

  • User-1811612959 posted

    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.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 24, 2012 6:15 PM
  • User102459681 posted

    I referenced the DLLs in the MySQL folder and not in my bin folder...
    The DLLs had to be in the Bin. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 24, 2012 7:55 PM