I have a Variable User:AllBatches (ObJect) populated from an ADO.NET SQL Query. The SQL query returns a single column of Integers. That part of my package is working.
The next step is a ForEach Loop using the User:AllBatches as the variable enumerator.
In the variable mapping section choose a variable to map to the collection variable index 0. However if I choose any variable type other than Object, the package errors.
If I choose an Object variable then my SQL Task fails with Unsupported Data Type on Parameter binding and I can't then get the value of the Object to use in the SQL Task inside the loop.
If I set it to be an Int32 then I get The Tyoe of the Variable (DBNULL) differs from the current variable type (INT32).
SO if the variable collection mapping will only support an Object Type how do I get the INTEGER value from that output object variable.