Quantcast
Channel: Microsoft SQL Server Community Samples: Integration Services
Viewing all articles
Browse latest Browse all 582

New Post: Binary code in the script is not found

$
0
0
Hi all,

I am trying to use the new EzScript component. My C# code looks like this:
        EzScript BuildNaturalKey = new EzScript(DataFlowTask1);
        BuildNaturalKey.ScriptLanguage = "CSharp";
        BuildNaturalKey.ReadOnlyVars = "User::NaturalKey";
        BuildNaturalKey.AttachTo(LoggingInfo);
        Console.Write("Script Input - " + BuildNaturalKey.InputCount.ToString());
        BuildNaturalKey.LinkAllInputsToOutputs();
        BuildNaturalKey.InitNewScript();
        BuildNaturalKey.PutSourceFile("main.cs", codeString);
       BuildNaturalKey.InsertOutputColumn("NaturalKey");
        BuildNaturalKey.SetOutputColumnDataTypeProperties("NaturalKey", DataType.DT_WSTR , 700, 0, 0, 0);
        BuildNaturalKey.Build();
Everything works fine, code runs, package is generated, but when I open it in BIDS I get the error "Binary code for the scriptis not found." When I open the script editor, the code I placed in main.cs is there, and when I simply close the window and hit okay, the script compiles.

The key difference, of course, is now the BinaryCode element of the script task's XML in the package has the binary code in it, when the original generated package is blank.

I thought the Build() command generated the BinaryCode? I see the thing in there with the BinaryCodeIndexer, but I have no how idea how to use this, and well, you guys aren't the best about documentation : )

Viewing all articles
Browse latest Browse all 582

Trending Articles