title: Package Variable is lost after being used as in script component
body: <p>I have an execute sql task that stores the result set as a package variable with an object datatype. I have a foreach loop container that executes a data flow task. Inside my data flow task, I have a script component that acts as a data source. I populate the output buffer of the script component using the package variable mentioned earlier with the following code:</p>
  
  <pre><code>public override void CreateNewOutputRows()
  {
      DataTable dt = new DataTable();
      OleDbDataAdapter oleda = new OleDbDataAdapter();
      oleda.Fill(dt, this.Variables.ResultSet);
  
      foreach (DataRow row in dt.Rows)
      {
          Output0Buffer.AddRow();
          Output0Buffer.Column1 = Convert.ToInt64(row["Column1"].ToString());
          Output0Buffer.Column2 = Convert.ToInt64(row["Column2"].ToString());
      }
  }
  </code></pre>
  
  <p>In the first iteration of the loop, it works fine. But on the succeeding iteration, the package variable value is lost. I'm not getting any record on my rows. </p>