Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

SSIS Expression task can't see variables populated by a containing foreach loop

$
0
0

I'm trying to collect a list of file paths from a directory, concatenate them together and then send that value to an execute process task. To do this, I'm using a ForEach loop with an expression task inside that is supposed to stuff the path from each iteration of the loop into a variable. The problem is that when the expression task runs it throws the following error.

Error: The type of the value (Empty) being assigned to variable "User::CombinedPath"
differs from the current variable type (String). Variables may not change type
during execution. Variable types are strict, except for variables of type Object.

The expression task is basically doing this:

@[User::PathFromForEach]+";"

However, it appears that @[User::PathFromForEach] is coming in empty.

What's going on here?


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>