Please download parent and child package review in detail
- Define package Parentpkg and variable VariableDefinedInParentpkg with any value
- Define package Childpkg and variable VariableDefinedInParentpkg with value 100
- Add script task to set VariableDefinedInParentpkg as VariableDefinedInChildPkg
- Add script task to set VariableDefinedInParentpkg as VariableDefinedInChildPkg
- Pass child variable to parent variable in script
public void Main()
{
// TODO: Add your code here
Dts.Variables["VariableDefinedInParentpkg"].Value = Dts.Variables["VariableDefinedInChildPkg"].Value;
Dts.TaskResult = (int)ScriptResults.Success;
}
- Run child package in parent package
MessageBox.Show("User::VariableDefinedInParentpkg:" + Dts.Variables["User::VariableDefinedInParentpkg"].Value.ToString());
- Run parent package and get msgbox below
Pass variable from parent package to child package
Please download parent and child package review in detail- Define package Parentpkg and variable VariableDefinedInParentpkg with any value
- Define package Childpkg and variable VariableDefinedInParentpkg with value 100
- Use package configuration to pass value to child
- When running package, get value from parent
No comments:
Post a Comment