How do you access a RecordSet variable inside a Script Task?
Listed below is the code I used to load a datatable in a C# script task from a recordset or resultset variable. "User::transactionalRepDBs" is a SSIS variable of Object (System.Object) that was loaded through a "Full result set" from a execute SQL task script. This link assisted me.
using System.Data.OleDb;
DataTable dt= new DataTable();
OleDbDataAdapter adapter = new OleDbDataAdapter();
adapter.Fill(dt, Dts.Variables["User::transactionalRepDBs"].Value);
foreach (DataRow row in dt.Rows)
{
//insert what you want to do here
}