I want to import columns via the script component in SSIS. As output I created Col1 to Col50. Usually I would use
File1OutputBuffer.Col1 = columns[0];
but since the column length is not identical I would like to set a loop like
Dim count As Integer = 1
For Each colInfo As Columns_ITIM In columnInfos
File1OutputBuffer.Col & count = colInfo.code
count = count + 1
Next
Is it possible to accomplish this somehow? I already tried File1OutputBuffer.["Col" & count]
but this is not working.
What I want to accomplish.
Let us say the first Dataset has 3 Columns then:
File1OutputBuffer.Col1 = colInfo.code
File1OutputBuffer.Col2 = colInfo.code
File1OutputBuffer.Col3 = colInfo.code
the second Dataset has 5 Columns then:
File1OutputBuffer.Col1 = colInfo.code
File1OutputBuffer.Col2 = colInfo.code
File1OutputBuffer.Col3 = colInfo.code
File1OutputBuffer.Col4 = colInfo.code
File1OutputBuffer.Col5 = colInfo.code