2

I'm using a web services task in SSIS and it's working okay. One of the parameters is a string[] array. I can type type in the values to the editor and it works fine, but I want to load it from a variable. But I can't figure out how to create/set a string array variable. I created a string variable and set it to things like {'Test'} or ['Test'], but they didn't work.

Ultimately what I want to do is have it be an expression where some of the strings are other variables. ArrayList = @SystemVariable::PackageName, @SystemVariable::TaskName....

2
  • ArrayList is an SSIS variable of type Object, yes? The only way I can think of to fill that will be a script task. Commented Feb 17, 2012 at 18:37
  • Was hoping to avoid that, but does seem to be the only way. Been working with it just can't quite figure out. Commented Feb 21, 2012 at 12:24

1 Answer 1

4

First declare an objcet variable and in script component convert your variable to string array. Finally passing your array to object variable that you declare. For example I declare an object variable on package level and in script component I'm passing string array to object variable.

string[] liste = Dts.Variables["Receipients"].Value.ToString().Split(',');
Dts.Variables["List"].Value = liste;
Sign up to request clarification or add additional context in comments.

Comments

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.