I have made the following settings to create a working project (console application, .NET 3.5) with dotConnect for MySQL v 6.50.214:
- App.config:
- Added references to:
\Program Files\Devart\dotConnect\MySQL\Devart.Data.dll
\Program Files\Devart\dotConnect\MySQL\Devart.Data.MySql.dll
\Program Files\Devart\dotConnect\MySQL\Enterprise Library\NET3.5\bin\Devart.Data.MySql.EnterpriseLibrary.dll
\Program Files\Devart\dotConnect\MySQL\Enterprise Library\NET3.5\bin\Microsoft.Practices.EnterpriseLibrary.Common.dll
\Program Files\Devart\dotConnect\MySQL\Enterprise Library\NET3.5\bin\Microsoft.Practices.EnterpriseLibrary.Data.dll
- Working code:
Code: Select all
MySqlDatabase dtBase = new MySqlDatabase("host=db;port=3308;database=test;User id=root;password=root;");
IDataReader reader = dtBase.ExecuteReader(CommandType.Text, "select * from dept");
while (reader.Read())
Console.WriteLine(reader[0]);
Console.ReadKey();
If this doesn't help, please
send us:
1) a small test project to reproduce the issue in our environment;
2) .NET call stack with the Devart.* components. Navigate to the Debug > Exceptions menu of VS and select the "Thrown" checkbox for "Common Language Runtime Exceptions".