I have a dynamic for each loop using For Each ADO (fetching VariableName from object variable) that is working fine when package is executed manually or in debugging mode but it is failing when implemented in SSIS job step with this error :
Description: The data type of variable "VariableName" is not supported in an expression.
Reading the variable "VariableName" failed with error code 0xC00470D0.
Code: 0xC001C012Source: Foreach Loop
Description: ForEach Variable Mapping number 1 to variable "VariableName" cannot be applied.
VariableNAME is assigned index 0
I`m using visual studio 2008 and SQL server 2008 (10.0.5500)