I am working on a script task that will log the name of the configuration file used by the package. I understand how to how to use the Configurations class. My big hurdle is how do I reference the parent package so i can get Package.Configurations?
The sample code i found online was showing how to create a new package and create the configurations. I was unable to find example of how to reference the parent package.
Thanks for the information, looks great. However, the next question is how to expose the
Parent.Configurations (object). I don't see it listed anywhere. The goal is to log the name of the XML file containing the properties. I am not seeing that as an option.
Any help with that would be appreciated. Thanks in advance
Thanks for the information, looks great. However, the next question is how to expose the
Parent.Configurations (object). I don't see it listed anywhere. The goal is to log the name of the XML file containing the properties. I am not seeing that as an option.
Any help with that would be appreciated. Thanks in advance
why not add the filename also as value of variable in parent package and then pass that variable value to child using parent package configuration type.
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
So, we have multiple configurations files being used. The goal is to log the path of each just to ensure that the right files are being used during run time in case someone package has been changed is referencing another configuration file other than what we expect.
From what I am seeing there is no way to reference the object Package.Configurations within the a script task for the current package. At least it isn't clear by looking at examples how i can reference the current packages values.
I may be missing that. I would like to setup a variable that holds the package properties and then within the script task assign cfgs to Package.Configurations to get the collection and loop through logging the path to each config file.
sorry i'm not understanding your full scenario. where do you get values from? are value are configurations themselves or values stored within configuration properties? Also whats the issue you're facing when trying to pass parents package config values through variable created inside and passed on to child using pacrent package variable configuration type?
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
The scenario is we have two configuration files per package
1. common.dtsconfig - this contains common variables used by all packages (i.e. SqlConn) 2. <package>dtsconfig - this contains flags for enabling/disabling external tools as necessary for specific package (i.e. EnableScrubber)
The goal at runtime is to have a script task within the package (vb or c#) that I can use the DTS.Log command and log the name of each of the configuration files.
I know one of the properties of the package is Configurations (collection). I found articles on how to create a new package and new configuration not in SSIS but the .Net app.
The issue that I am facing is how to reference the current package.configurations in the script task. I am hoping this is possible but I haven't been able to find an example out there that does that. My goal would be to loop through the configurations one at a time and log Configuration.
As an example we might do something like this
DTS.LOG(Configuration.ConfigurationString). Hope this gives a bit of a clearer picture. thanks again.