September 13, 2009 at 7:34 am
I was wondering if there is a way of writing a script to go through the list of variables and log what their default values are at runtime.
The method I currently use is that I put all the variables into the readonlyvariables parameter, and then loop through them to log what they are to the ssisconfig.
The problem is that when I add a new variable, I have to manually go into the scripting task to add the new variable to the list of readonlyvariables for it to be picked up.
I was wondering if there is a way to for either the readonlyvariable parameter to be updated every time a new variable is created, or a way of looping through the package variables in a scripting task without using the readonlyvariable parameter.
Every time I try to script it without the readonlyvariable parameter using the 'Variable' object, it seems to only reference the variables in the readonlyvariable parameter.
Any help would be appreciated.
September 13, 2009 at 3:36 pm
johnpaulmurphy2005 (9/13/2009)
I was wondering if there is a way of writing a script to go through the list of variables and log what their default values are at runtime.The method I currently use is that I put all the variables into the readonlyvariables parameter, and then loop through them to log what they are to the ssisconfig.
The problem is that when I add a new variable, I have to manually go into the scripting task to add the new variable to the list of readonlyvariables for it to be picked up.
I was wondering if there is a way to for either the readonlyvariable parameter to be updated every time a new variable is created, or a way of looping through the package variables in a scripting task without using the readonlyvariable parameter.
Every time I try to script it without the readonlyvariable parameter using the 'Variable' object, it seems to only reference the variables in the readonlyvariable parameter.
Any help would be appreciated.
There is no way you can iterate over package variables unless you have access to the package object. And the standard API doesn't have method to access the package object. However there is a third-party solution available on the market called Package Connection, part of the CozyRoc SSIS+ library. It allows access to the package object at runtime.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply