2009-10-19 5 views
1

저는 Rhino-ETL을 잠깐 사용 해왔고 꽤 매끄 럽습니다. 그러나 MySQL DB에 연결하는 데 문제가 있습니다.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 폴더에있는 연결 문자열은 간단한 웹 사이트에서 잘 작동

<add name="testConnectionString" connectionString="server=localhost;user id=dev;password=xxxxx;persist security info=True;Database=test" 
providerName="MySql.Data.MySqlClient" /> 

처럼 내가 app.config에

내 연결 문자열이 보인다, 디버깅 목적으로 데이터 원본으로 사용됩니다. asp.net 3.5, win 7 및 VS 2008을 실행 중이므로이 문제에 대한 도움을 주시면 감사하겠습니다.

ETL 프로젝트의 간단한 테스트도 Type.GetType ("XXX")와 몇 가지 작업 후

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

답변

1

을 노력하면은 "MySql.Data.MySqlClient.MySqlConnection, MySql.Data 작업 시작 "resharper 제안"모듈 자격 수정 "

<add name="testConnectionString" connectionString="server=localhost;user id=dev;password=xxxxx;persist security info=True;Database=test" 
providerName="MySql.Data.MySqlClient.MySqlConnection, MySql.Data, Version=6.1.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />