title: Passing a variable value from Control Flow to Data Flow in SSIS
body: <p>I have a fairly straightforward SSIS package where I can't sucessfully pass the value of a package-scoped variable from the Control Flow to a Data Flow task.  Consider the below diagram:</p>
  
  <p><img src="https://i.stack.imgur.com/NrFVH.jpg" alt="Control Flow"></p>
  
  <p>The Execute SQL task gets values from a list of "machines".  This is used to control a ForEach Loop Container, which works very well.  Next a script task performs some math and assigns a single number to a package scoped variable (integer type).  I have added message boxes that pop up during the loop so that I can verify that the value of this variable is being set properly.</p>
  
  <p>The last icon is a data flow where I want to use the variable value.  I have a simple script task that contains just a message box showing me the current value of this same variable.  Every time, the variable is the value that I initially set in the designer (BIDS).  Therefore, the value is not being "passed" to the data flow.  I have verified multiple times that the names of the variables are correct (including case sensitive values).</p>
  
  <p>This should be pretty simple, and I am getting frustrated with this issue.  I would greatly appreciate and suggestions or comments.  Thank you!</p>