6

I'm trying to help our dba by supplying script written with c#, so he can use it in his ScriptComponent.

I have an input file, process it line by line and create a row in Output0Buffer as it is explained in http://www.codeproject.com/Articles/441678/Getting-Started-With-SSIS-Script-transforms?fid=1765989&tid=4344144

I have written the test method and it works fine, however after inserting the logic inside of Input0_ProcessInputRow method as it's shown in the example, we are getting an error saying that Output0Buffer does not exist on the following lines:

    Output0Buffer.AddRow();
    Output0Buffer.Data = line;
    Output0Buffer.RegionName = regionName; 

Error CS0103 The name 'Output0Buffer' does not exist in the current context

What are we missing here?

1 Answer 1

16

I found why that happened. Basically, when creating the output, I changed its name explicitly to Output0Buffer and should have changed SynchronousInputID property to "None".

That did the trick.

This can be done by:

  • clicking on the Script Transformation Editor,
  • clicking the catagory Inputs and Outputs,
  • clicking on Output 0, and
  • changing SynchronousInputId to None in the right hand panel:

enter image description here

Sign up to request clarification or add additional context in comments.

2 Comments

It depends whether you want to create one line per inputline, or many. If you want one line, then you the new columns are just part of the Input Columns, and there is no need for Output0Buffer. If you want many, then this answer is correct.
Right, if you choose None, you lose all of the input columns. You can either code with Output0Buffer and have just new output columns or all input columns and the new output columns, but then with Row.myNewColumn in each loop step. See also SSIS Script Component - How to modify the Output0Buffer - DBA SE.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.