I'm trying to do something very simple, and having a tough time with it.
I've got a Global Variable that gets a string value assigned to it in a Script Task, and then I need to access that value in Execute Process Task Expression. When running, by the time it gets to the Process Task, the global variable's value in the expression is still blank, even though a breakpoint on the task shows that it does have a value.
What am I doing wrong? This seems too simple to give me this much problem.
Make sure that you don't have another variable defined at the Script Task scope level.Also, can you share the code you're using to set the value of the variable?|||
all variables are package scope level. I've got two variables for the script task set in the ReadWriteVariables area; pszFinCycle and ZipFile. ZipFile is the variable that has the value that will be used later in the Process Task.
Code Snippet
Dts.Variables("pszFinCycle").Value = Format(Now, "yyyyMMdd").ToString
Dts.Variables("ZipFile").Value = "EXTRACT" + Dts.Variables("pszFinCycle").Value.ToString + ".ZIP"
Dts.TaskResult = Dts.Results.Success
|||
DrinkGreen wrote:
all variables are package scope level.
Right. Make sure that when the script task is highlighted that you don't have ANOTHER variable defined at that scope. You can have multiple variables of the same name in a package that have different scopes.
The code looks good to me.|||Or that the Execute Process Task doesn't have another variable of the same name, but different scope.
No comments:
Post a Comment