![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I set up a package within another package. The inner package has a global variable, vartest, of which its default value can be manually changed from the outer package by clicking on the package task and then clicking Inner Package Global Variables. I set up an ActiveX script to try to programatically change the inner package global variable, but seem to be having trouble: Set oPKG = DTSGlobalVariables.Parent oPKG.Steps("DTSStep_DTSExecutePackageTask_1"). DTSGlobalVariables("Vartest").Value = "Phone" Object doesn't support this property or method ................. Can this be done ? Also can the step name be changed, DTSStep_DTSExecutePackageTask_1 is not very descriptive. |
#3
| |||
| |||
|
|
rmcompute wrote: I set up a package within another package. The inner package has a global variable, vartest, of which its default value can be manually changed from the outer package by clicking on the package task and then clicking Inner Package Global Variables. I set up an ActiveX script to try to programatically change the inner package global variable, but seem to be having trouble: Set oPKG = DTSGlobalVariables.Parent oPKG.Steps("DTSStep_DTSExecutePackageTask_1"). DTSGlobalVariables("Vartest").Value = "Phone" Object doesn't support this property or method ................. Can this be done ? Also can the step name be changed, DTSStep_DTSExecutePackageTask_1 is not very descriptive. Hi rmcompute, the 'Step' object does not have a collection of Global Variables, so your script is wrong. You should set the value of a Global Variable in the outer package using the ActiveX script, then pass this GlobalVar to the inner one. If you wanna change a step name: 1) Delete temporarly the costraints which link this step to other steps. 2) Mouse Righ-Click-->Disconnected edit --> Steps --> (your step) -- Name porperty 3) After having renamed the step restore the constraints you previously deleted. Bye |
#4
| |||
| |||
|
|
Thanks Davide. The disconnected edit worked. I still have an issue with passing the global variable to the inner package. I created a variable in the outer package with: DTSGlobalVariables("Vartest").value = "Test05" Inside of the Package task I set the following on the InnerPackageGlobalVariables: Name Type Value Vartest String <not displayable The global variable has definitely been set on the outer package, but it is not being passed to the inner package. Is there something else that needs to be done ? "Davide" wrote: rmcompute wrote: I set up a package within another package. The inner package has a global variable, vartest, of which its default value can be manually changed from the outer package by clicking on the package task and then clicking Inner Package Global Variables. I set up an ActiveX script to try to programatically change the inner package global variable, but seem to be having trouble: Set oPKG = DTSGlobalVariables.Parent oPKG.Steps("DTSStep_DTSExecutePackageTask_1"). DTSGlobalVariables("Vartest").Value = "Phone" Object doesn't support this property or method ................. Can this be done ? Also can the step name be changed, DTSStep_DTSExecutePackageTask_1 is not very descriptive. Hi rmcompute, the 'Step' object does not have a collection of Global Variables, so your script is wrong. You should set the value of a Global Variable in the outer package using the ActiveX script, then pass this GlobalVar to the inner one. If you wanna change a step name: 1) Delete temporarly the costraints which link this step to other steps. 2) Mouse Righ-Click-->Disconnected edit --> Steps --> (your step) -- Name porperty 3) After having renamed the step restore the constraints you previously deleted. Bye |
#5
| |||
| |||
|
|
rmcompute wrote: Thanks Davide. The disconnected edit worked. I still have an issue with passing the global variable to the inner package. I created a variable in the outer package with: DTSGlobalVariables("Vartest").value = "Test05" Inside of the Package task I set the following on the InnerPackageGlobalVariables: Name Type Value Vartest String <not displayable The global variable has definitely been set on the outer package, but it is not being passed to the inner package. Is there something else that needs to be done ? "Davide" wrote: rmcompute wrote: I set up a package within another package. The inner package has a global variable, vartest, of which its default value can be manually changed from the outer package by clicking on the package task and then clicking Inner Package Global Variables. I set up an ActiveX script to try to programatically change the inner package global variable, but seem to be having trouble: Set oPKG = DTSGlobalVariables.Parent oPKG.Steps("DTSStep_DTSExecutePackageTask_1"). DTSGlobalVariables("Vartest").Value = "Phone" Object doesn't support this property or method ................. Can this be done ? Also can the step name be changed, DTSStep_DTSExecutePackageTask_1 is not very descriptive. Hi rmcompute, the 'Step' object does not have a collection of Global Variables, so your script is wrong. You should set the value of a Global Variable in the outer package using the ActiveX script, then pass this GlobalVar to the inner one. If you wanna change a step name: 1) Delete temporarly the costraints which link this step to other steps. 2) Mouse Righ-Click-->Disconnected edit --> Steps --> (your step) -- Name porperty 3) After having renamed the step restore the constraints you previously deleted. Bye To pass the Variable to inner package: Inside of the Package task select 'VarTest' from the OuterPackageGlobalVariables. Bye |
![]() |
| Thread Tools | |
| Display Modes | |
| |