Hi,
I have the following code that creates output columns dynamically based on the input columns in a custom SSIS component:
// Create corresponding output columns dynamically IDTSOutput100 output = ComponentMetaData.OutputCollection[0]; foreach (IDTSInputColumn100 inputcolumn in input.InputColumnCollection) { bool IsExist = false; foreach (IDTSOutputColumn100 OutputColumn in output.OutputColumnCollection) { if (OutputColumn.Name == inputcolumn.Name) { IsExist = true; } } if (!IsExist) { IDTSOutputColumn100 outputcol = output.OutputColumnCollection.New(); outputcol.Name = inputcolumn.Name; outputcol.Description = inputcolumn.Name; outputcol.SetDataTypeProperties(inputcolumn.DataType, inputcolumn.Length, inputcolumn.Precision, inputcolumn.Scale, inputcolumn.CodePage); } }
This code works perfectly, but I want to update it so that if I unselect a column in the advanced editor of the component (in the input columns tab), then the corresponding output column is deleted too.
Does anyone know how to do this?
Thanks