I am working on a SSIS project in SQL server 2008
I have a problem to reuse object variable inside a [foreach loop]. But other variables like string or int works ok inside the [foreach loop].
I describe my procedure in the attached picture. and my the code that I used to call object in is in the attached code.
(1) I generate a a recordset and want ti to be used everywhere in my package. I generate the recordset from a [control flow task] and then
(2) My problem is when in the [Foreach loop], in 1st time I can get correct values from object variable , but in later time it seems object variable is empty (please see the attached picture)
Please help me this. thanks in advance.
public override void CreateNewOutputRows()
OleDbDataAdapter DA_Loc = new OleDbDataAdapter();
DataTable DT_Loc = new DataTable();
MessageBox.Show(DT_Loc.Rows.Count.ToString()); // count row number