title: SQL Server Integration Services. Dynamic changing of connection string by package parameters inside of foreach
body: <p>I need to get data from several databases using SQL Server Integration Services (more than 20) and for each of them execute the package that transfers the data to a target database, there is a table with a list of connection strings of these databases in other database. </p>
  
  <p>I try to execute the <code>ExecutePackage</code> task inside <code>foreach</code> task and send connection string from query as package's parameter, also I send connection string of target database and date. But package stops with error:</p>
  
  <blockquote>
    <p>[Importing [11]] Error: SSIS error code: DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The call to the AcquireConnection method of the connection manager "targetdb" failed with error code 0xC0202009. You may have previously published error messages that contain more detailed information about the reason for the failure of the AcquireConnection method.</p>
  </blockquote>
  
  <p>I think the connection manager of targetdb does not pass validation, in this case I run package directly from Visual Studio. When I run package separately (not inside foreach and with default parameters), then it works right.</p>
  
  <p>Is it right way for my task? </p>