for reference add i add from .net.
------------------------------------------------------
using System.IO;
using System.Configuration;
using MySql.Data.MySqlClient;
namespace adwebsite
{
public partial class Photo : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string con = string.Format("Server=180.00.000.00;Uid=*******;Pwd=*******;Database=*******;");
}
}
}
------------------------------------------------------
In Local its run Complete and it fetch complete data.
but when i upload in hosting server it occur Compilation Error.
}
}
}
------------------------------------------------------
In Local its run Complete and it fetch complete data.
but when i upload in hosting server it occur Compilation Error.
Compiler Error Message: CS0246: The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?)
Line 14 : using MySql.Data.MySqlClient;


Joxin Stanly181 reputationPosted Aug 17, 2013, 6:23 AM EDT
I guess you need to include the dll in debug/release folder.
you can include by setting the 'Copy local= true' of the dll file.
hope this fixes your issue.
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 17, 2013, 6:31 AM EDT
How you added the reference of MySql.Data.MySqlClient in your project
Regards,
Iftikar
Vasu GadhiyaRank #7,540 · 239 reputationPosted Aug 29, 2013, 9:37 PM EDT
Copy To local not Working,
also i put dll in debug folder but it not working.
----------------------
i add dll
Add reference > .net Tab > Mysql.Data > Ok
----------------------
it complete Working in Offline but when i upload in hosting server it occur Compilation Error.
thanks.
Vasu GadhiyaRank #7,540 · 239 reputationPosted Aug 29, 2013, 11:34 PM EDT
i put bin directory in main folder. (httpdocs)
and its complete fetch data.