Is it possible to loop through all user variables?

  • I use variables and expressions to create dynamic sql statements in my SSIS package. I am getting an error on a variable but when I use breakpoints Visual Studio says it is busy when trying to see the value of the variable and locks up every time. I have components to send me the error message in an email and I would like to loop through all of the user variables in the script and get the name and it's current value to help me debug the issue. Is there a way to do this in a script?

    Thank you very much for your help.

    Chris

  • chrisl-1031171 (7/30/2010)


    I use variables and expressions to create dynamic sql statements in my SSIS package. I am getting an error on a variable but when I use breakpoints Visual Studio says it is busy when trying to see the value of the variable and locks up every time. I have components to send me the error message in an email and I would like to loop through all of the user variables in the script and get the name and it's current value to help me debug the issue. Is there a way to do this in a script?

    Thank you very much for your help.

    Chris

    You can either Msgbox to display the value of the variable inside the script.

    Other choice is to use late binding access of the variables using Dts.VariableDispenser if you are not accessing variable using that way.

    [font="Arial"]BASKAR BV
    http://geekswithblogs.net/baskibv/Default.aspx
    In life, as in football, you won’t go far unless you know where the goalposts are.[/font]

  • That will work great, thanks for the help.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply