MySQL.Data cannot be found..?http://forums.asp.net/t/1773603.aspx/1?MySQL+Data+cannot+be+found+Fri, 24 Feb 2012 23:55:38 -050017736034850090http://forums.asp.net/p/1773603/4850090.aspx/1?MySQL+Data+cannot+be+found+MySQL.Data cannot be found..? <p>Hi Folks,</p> <p>I'm using MySQL with Asp.net for the first time.<br> I'm trying to simply open the connection to the DB.</p> <p>However I'm getting the error that MySQLData cannot be found and therefore MySQLConnection is undefined.</p> <p>I did add references to <strong>MySql.Data.dll</strong> &amp; <strong>MySql.Web.dll&nbsp;</strong>&nbsp;v4.0....</p> <p>Any ideas why it would still not show up even after the references where added...?</p> <p>I'm also importing the namespace in the code:<br> &lt;%@ Import Namespace=&quot;MySQL.Data&quot; %&gt;&nbsp;</p> <p>Regards,<br> Andy&nbsp;</p> 2012-02-24T21:55:39-05:004850098http://forums.asp.net/p/1773603/4850098.aspx/1?Re+MySQL+Data+cannot+be+found+Re: MySQL.Data cannot be found..? <p>I tried&nbsp;createing MySQLConnection &nbsp;in ASP MVC 2 application and It worked for me.</p> <p>I imported &lt;%<span size="2" style="font-size:small"><span size="2" color="#0000ff" style="color:#0000ff; font-size:small"><span size="2" color="#0000ff" style="color:#0000ff; font-size:small">@</span></span><span size="2" style="font-size:small"> </span><span size="2" color="#a31515" style="color:#a31515; font-size:small"><span size="2" color="#a31515" style="color:#a31515; font-size:small">Import</span></span><span size="2" style="font-size:small"> </span><span size="2" color="#ff0000" style="color:#ff0000; font-size:small"><span size="2" color="#ff0000" style="color:#ff0000; font-size:small">Namespace</span></span><span size="2" color="#0000ff" style="color:#0000ff; font-size:small"><span size="2" color="#0000ff" style="color:#0000ff; font-size:small">=&quot;MySql.Data.MySqlClient&quot;</span></span><span size="2" style="font-size:small"> %&gt;&nbsp;after&nbsp;adding <strong>MySql.Data.dll</strong> reference.&nbsp; Then I was able to create the connection.</span></span></p> 2012-02-24T22:15:45-05:004850153http://forums.asp.net/p/1773603/4850153.aspx/1?Re+MySQL+Data+cannot+be+found+Re: MySQL.Data cannot be found..? <p>I referenced the DLLs in the MySQL folder and not in my bin folder...<br> The DLLs had to be in the Bin.&nbsp;</p> 2012-02-24T23:55:38-05:00