I Created a DataAccess layer to connect any app with a mysql Database using Enterprise Library Data 5 for mysql, i used the dlls:
-EntLibContrib.Data.MySql.dll.enter code here
-Microsoft.Practices.EnterpriseLibrary.Common.dll.
-Microsoft.Practices.EnterpriseLibrary.Data.dll.
The version of each dll is 5.505.0.
i installed the full version of mysql server 5.5 with all the futures as developer machine. In my data access layer i had a method to call a stored procedure:
public DataSet ExecuteDataSet(string sp_name, object[] parameters)
{
try
{
Database BD = new MySqlDatabase(_strCon);
DbCommand cmd = BD.GetStoredProcCommand(sp_name, parameters);
using (DataSet ds = BD.ExecuteDataSet(cmd))
return ds;
}
catch (Exception e)
{
throw new Exception(e.Message);
}
}
I get an error in this line:
Database BD = new MySqlDatabase(_strCon);
in my app config i have the connection string:
And the exception (FileNotFoundException) says:
Could not load file or assembly 'MySql.Data, Version=6.4.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.