我想通过SSIS中的脚本组件导入列。作为输出,我创建了Col1到Col50。通常我会用
File1OutputBuffer.Col1 = columns[0];
但由于列长不相同,我想设置一个像
这样的循环 Dim count As Integer = 1
For Each colInfo As Columns_ITIM In columnInfos
File1OutputBuffer.Col & count = colInfo.code
count = count + 1
Next
有可能以某种方式实现这一目标吗?我已经尝试File1OutputBuffer.["Col" & count]
但这不起作用。
我想要完成的任务。
让我们说第一个数据集有3列:
File1OutputBuffer.Col1 = colInfo.code
File1OutputBuffer.Col2 = colInfo.code
File1OutputBuffer.Col3 = colInfo.code
第二个数据集有5列然后:
File1OutputBuffer.Col1 = colInfo.code
File1OutputBuffer.Col2 = colInfo.code
File1OutputBuffer.Col3 = colInfo.code
File1OutputBuffer.Col4 = colInfo.code
File1OutputBuffer.Col5 = colInfo.code