Hi all, I am stuck at figuring out why the following parameters for an Execute SQL Task and Foreach Loop Container are not right. This format is almost identical to a book I am reading but it is not working! The variables themselves are scoped to the package and everything else here seems correct but being new to SSIS I am not understanding the errors which are:
Error: 0xC002410D at Foreach Loop Container: The enumerator failed to retrieve element at index "1".
Error: 0xC001C012 at Foreach Loop Container: ForEach Variable Mapping number 1 to variable "User::sDbName"
cannot be applied.
I know that the SQL statement outputs all of the rows that I want because I built it and the SQL Task completes successfully but the Foreach Loop stops. There are only 26 rows from this table for now so I know that the enumerator should have been able to retrieve the element at index 1 but for some reason it does not. Any ideas? I've been stuck on this for a bit now and really don't understand why it isn't working.
Execute SQL Task
ResultSet = Full result set
ConnectionType = OLE DB
Connection = MICHAEL-PC.EconAnalysis
SQLSourceType = Direct input
SELECT Table_Links FROM dbo.tblLinks
BypassPrepare = True
No Parameter Mapping
Result Name = 0
Variable Name = flObj (of Object datatype)
Foreach Loop Container
Enumerator = Foreach ADO Enumerator
ADO object source variable = User::flObj
Rows in first table selected
Variable = User::sDbName
Index = 1
MordredKeep on Coding in the Free World