Pergunta

I am sure, I am missing something obvious here. I am trying to get my sample RhinoETL based app to talk to a sql server. It just would not do that. I am following the video tutorial by Paul Barriere.

using Rhino.Etl.Core.Operations;
namespace RhinoETLTest01.Operations
{
class WriteJoinedRecordsToSql : SqlBulkInsertOperation
{
    public WriteJoinedRecordsToSql() : base("TestEtl", "dbo.NameAndTitle") {}

    protected override void PrepareSchema()
    {
        Schema["Id"] = typeof(int);
        Schema["FullName"] = typeof (string);
        Schema["JobTitle"] = typeof (string);
    }

}

}

I am able to merge data from 2 files and write them into a 3rd text file. But, I cant get the merged records to get into a sql table. What am I missing please? My App.Config has the correct connectionstring setting.

Thanks

Foi útil?

Solução

I had a similar problem. The solution was to fully qualify the sql provider in the connection string in the App.config

<configuration>
  <connectionStrings>
    <add name="TestEtl"
       connectionString="Data Source=TestEtl;Initial Catalog=NameAndTitle;Integrated Security=SSPI;Timeout=300;"
       providerName="System.Data.SqlClient.SqlConnection, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
  </connectionStrings>
</configuration>

After that check your sql commands for correctness. I downloaded the full source and stepped through to find these and related issues.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top