2009-10-19 7 views
1

J'utilise Rhino-ETL depuis un petit moment et il fonctionne assez bien. Cependant, j'ai un problème de connexion à ma base de données MySQL.Problème avec Rhino-Etl et 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 est référencé et situé dans mon dossier bin

Ma chaîne de connexion i App.Config ressemble

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

La chaîne de connexion fonctionne très bien dans un site simple, à des fins de débogage, en tant que source de données. Je cours asp.net 3.5, gagnez 7 et VS 2008, et j'apprécierais n'importe quelle aide sur cette issue.

Un simple test dans le projet ETL travaille également

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

Répondre

1

Après quelques travaux avec Type.GetType ("xxx") il a commencé à travailler avec « MySql.Data.MySqlClient.MySqlConnection, MySql.Data "et puis resharper suggéré" Fix module qualification "

<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" />