首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Rhino-Etl和MySQL的问题

Rhino-Etl和MySQL的问题
EN

Stack Overflow用户
提问于 2009-10-20 03:57:07
回答 1查看 1.4K关注 0票数 1

我已经使用Rhino-ETL有一段时间了,它运行得非常流畅。但是,我在连接到我的MySQL数据库时遇到问题。

代码语言:javascript
复制
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被引用并位于my bin文件夹中

我的连接字符串I app.config如下所示

代码语言:javascript
复制
    <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,win 7和VS2008,在这个问题上如果有任何帮助我将不胜感激。

ETL项目中的一个简单测试也是有效的

代码语言:javascript
复制
            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();
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2009-10-20 05:30:22

在与Type.GetType("xxx")一起工作之后,它开始与"MySql.Data.MySqlClient.MySqlConnection,MySql.Data“一起工作,然后resharper建议”修复模块资格“

代码语言:javascript
复制
<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" />
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/1590767

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档