code:
......
......
// Add variable to hold parameter value
package.Variables.Add("Variable", false, "User", "Convert.ToDateTime("2010-01-01")");
// Add input parameter binding
task.ParameterBindings.Add();
IDTSParameterBinding parameterBinding = task.ParameterBindings.GetBinding(0);
parameterBinding.DtsVariableName = "User::Variable";
parameterBinding.ParameterDirection = ParameterDirections.Input;
parameterBinding.DataType = 7;
parameterBinding.ParameterName = "0";
parameterBinding.ParameterSize = -1;
上面表示增加一个参数的映射,那如果增加需2个参数映射呢?用Foreach怎么用?