0

Good morning,

I am currently developing a ssis script task in c#. I am asking myself, it is possible to loop through all input variables. Currently I am accessing every single variable using "Row.VariableName". Since I have many variables this is sort of a pain. And it gets even worse when I change the input variables. So, is it possible to loop through all input variables which I have selected within the script task window without calling every single variable indepently?

A classical for-each loop-container is not suited within my case due to some specialities within my script task.

I am would appreciate any advice. :)

user3656902
  • 23
  • 1
  • 5
  • 2
    This is hard to answer without more information on what you are trying to accomplish. Give some insight in the purpose of the script, the requirements that make it hard etc. – Tristan Aug 05 '14 at 07:48
  • `Row.variableName`? Are you sure about that? – billinkc Aug 05 '14 at 14:30

1 Answers1

0

I dont think this is achievable. I tried doing the same thing about 2 years ago and what I concluded was that the variables and their static values can be read from the package XML. But the run time dynamic values cannot be looped through and stored in some other table or flat file. Here is the question and answer from my past post.

Community
  • 1
  • 1
rvphx
  • 2,324
  • 6
  • 40
  • 69
  • Do you think they're trying to pull the values out of a stored package? My reading of the question was they wanted to enumerate through all the values in the currently running package. – billinkc Aug 05 '14 at 17:22
  • Same thing. I dont think you can enumerate the run time values of the variables. If you were just trying to find all the variables in the package then the link highlights the method to get to it I guess. – rvphx Aug 05 '14 at 17:24
  • It's not possible to enumerate through all package variables within a Script Task. The only way to do that is to hardcode a reference to the package itself and then loop through its variables. – Joost Aug 06 '14 at 06:54