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();