![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello All, I need to execute a child package from a parent package and I need to get the value of a global variable back from the sub package. The sub package may modify the value of the global variable at runtime and I need to get the modified value back after completion of the sub package. I am executing the sub package with an ActiveX script because I know one cannot get values back from the executed package when the Execute Package Task is used. My problem is that I get the value of the variable as it was when the package was saved, not the runtime value. All I need is for the child package to be able to tell the parent whether or not a specific step has executed in the child package. Any help is appreciated. Gerhard |
#3
| |||
| |||
|
|
Can you not call the sub package through the object model in an Active Script task and get the GV value that way? |
| "Gerhard Wessels" <gerhard (AT) eastmin (DOT) co.za> wrote in message news:uIuPjoloFHA.3316 (AT) TK2MSFTNGP14 (DOT) phx.gbl... Hello All, I need to execute a child package from a parent package and I need to get the value of a global variable back from the sub package. The sub package may modify the value of the global variable at runtime and I need to get the modified value back after completion of the sub package. I am executing the sub package with an ActiveX script because I know one cannot get values back from the executed package when the Execute Package Task is used. My problem is that I get the value of the variable as it was when the package was saved, not the runtime value. All I need is for the child package to be able to tell the parent whether or not a specific step has executed in the child package. Any help is appreciated. Gerhard |
#4
| |||
| |||
|
|
Allan Mitchell wrote: Can you not call the sub package through the object model in an Active Script task and get the GV value that way? That is what I'm doing but the value for the GV I get is not the runtime one, it's the one saved with the package, i.e. it is static. "Gerhard Wessels" <gerhard (AT) eastmin (DOT) co.za> wrote in message news:uIuPjoloFHA.3316 (AT) TK2MSFTNGP14 (DOT) phx.gbl... Hello All, I need to execute a child package from a parent package and I need to get the value of a global variable back from the sub package. The sub package may modify the value of the global variable at runtime and I need to get the modified value back after completion of the sub package. I am executing the sub package with an ActiveX script because I know one cannot get values back from the executed package when the Execute Package Task is used. My problem is that I get the value of the variable as it was when the package was saved, not the runtime value. All I need is for the child package to be able to tell the parent whether or not a specific step has executed in the child package. Any help is appreciated. Gerhard |
#5
| |||
| |||
|
|
So I have a package and in there I have a GV. A Script task sets the value of the variable to Cstr(Now()) In my calling package I want to retrieve this value and it should change at every invocation. Here is what I do Function Main() dim pkg set pkg = CREATEOBJECT("DTS.Package") pkg.LoadFromStorageFile "c:\called.dts","" pkg.execute MsgBox pkg.GlobalVariables("InnerGV").Value pkg.Uninitialize Main = DTSTaskExecResult_Success End Function The result is different every time. Allan On Wed, 17 Aug 2005 09:25:11 +0200, Gerhard Wessels gerhard (AT) eastmin (DOT) co.za> wrote: Allan Mitchell wrote: Can you not call the sub package through the object model in an Active Script task and get the GV value that way? That is what I'm doing but the value for the GV I get is not the runtime one, it's the one saved with the package, i.e. it is static. "Gerhard Wessels" <gerhard (AT) eastmin (DOT) co.za> wrote in message news:uIuPjoloFHA.3316 (AT) TK2MSFTNGP14 (DOT) phx.gbl... Hello All, I need to execute a child package from a parent package and I need to get the value of a global variable back from the sub package. The sub package may modify the value of the global variable at runtime and I need to get the modified value back after completion of the sub package. I am executing the sub package with an ActiveX script because I know one cannot get values back from the executed package when the Execute Package Task is used. My problem is that I get the value of the variable as it was when the package was saved, not the runtime value. All I need is for the child package to be able to tell the parent whether or not a specific step has executed in the child package. Any help is appreciated. Gerhard |
![]() |
| Thread Tools | |
| Display Modes | |
| |