1
我一直在使用Rhino-ETL一段时间,它运行得很顺利。但是,我有一个连接到我的MySQL数据库的问题。Rhino-Etl和MySQL问题
Rhino.Etl.Core.RhinoEtlException: Failed to execute operation Hornalen.Migration
.Process.ReadMessagesFromDb: The type name 'MySql.Data.MySqlClient' could not be
found for connection string: testConnectionString ---> System.InvalidOperationE
xception: The type name 'MySql.Data.MySqlClient' could not be found for connecti
on string: testConnectionString
at Rhino.Etl.Core.Infrastructure.Use.Connection(String name)
at Rhino.Etl.Core.Operations.InputCommandOperation.<Execute>d__0.MoveNext()
at Rhino.Etl.Core.Enumerables.SingleRowEventRaisingEnumerator.MoveNext()
at Rhino.Etl.Core.Enumerables.EventRaisingEnumerator.MoveNext()
at Rhino.Etl.Core.Pipelines.ThreadPoolPipelineExecuter.<>c__DisplayClass1.<De
corateEnumerableForExecution>b__0(Object)
--- End of inner exception stack trace ---
http://dev.mysql.com/downloads/connector/net/6.1.html mysql.data被引用,并位于我的bin文件夹
我的连接字符串我的app.config看起来像
<add name="testConnectionString" connectionString="server=localhost;user id=dev;password=xxxxx;persist security info=True;Database=test"
providerName="MySql.Data.MySqlClient" />
连接字符串中的一个简单的网站工作正常,用于调试目的,作为数据源。我正在运行asp.net 3.5,赢得7和VS 2008,我希望在这个问题上有任何帮助。
在ETL项目一个简单的测试也正在
MySql.Data.MySqlClient.MySqlConnection connection = new MySqlConnection(ConfigurationManager.ConnectionStrings["testConnectionString"].ConnectionString);
connection.Open();
MySqlCommand command = connection.CreateCommand();
command.CommandText = "select * from arter";
MySqlDataReader reader = command.ExecuteReader();
while (reader.Read())
{
System.Console.WriteLine(reader.GetInt32("artId"));
}
connection.Close();