SSIS - How to access a RecordSet variable inside a Script Task

后端 未结 3 1434
我寻月下人不归
我寻月下人不归 2020-12-06 09:55

How do you access a RecordSet variable inside a Script Task?

3条回答
  •  自闭症患者
    2020-12-06 10:18

    An easier way I found (using C#) is simply casting the object as a string array. This is how my C# code looks now:

    public void Main()
    {
     string[] arreglo = (string[])Dts.Variables["User::arreglo"].Value;
    
     ...
    
     foreach (string elemento in arreglo)
     {
      // do stuff on each element of the array/collection
     }
    
     ...
    }
    

提交回复
热议问题