Here is the first in what will hopefully be a long series of postings in what I have colloquially called my SSIS Nuggets series.
I was reading a post this morning from Sam Bendayan in which he was pondering how to store a full result set returned from the Execute SQL Task. He had followed BOL (which according to Sam states that a Full Result Set should be stored in a variable of type String) but was getting errors.
Well, that's not surprising really. BOL is wrong! A Full Result Set needs to be stored in variable of type Object. Typically you would then navigate through (sometimes called shred) this result set using a Foreach Loop (using the "Foreach ADO Enumerator"), carrying out whatever operations you wanted to on the way. In the example I have put together I simply output the contents of the current row of the result set using the familar message box.
Here's a screenshot of this package:

Here's everything that the package does:
- Populates a variable called User::FullResultSet using the Execute SQL Task. The data comes from the AdventureWorks.Production.Culture table (so you will need to have the AdventureWorks DB installed)
- Shreds the recordset using the Foreach loop and populates 2 variables: User::CultureID & User::Name with values from the current row of the result set
- Outputs the values of User::CultureID & User::Name in a message box
Yes yes, I know that Kirk, Allan & Darren, and myself have all previously posted similar examples of doing this, but one more can't hurt right?
You can download the package from here. All you need to do to run it is edit the connection manager to point at your SQL Server instance.
-Jamie