Hello Trying to figure out a clever solution for splitting multivalued columns out into n-columns. For that I've build a custom component in SSIS using ms-help://MS.VSCC.v80/MS.VSIPCC.v80/MS.SQLSVR.v9.en/dtsref9/html/4dc0f631-8fd6-4007-b573-ca67f58ca068.htm as an example. I need to be able to add columns to the OutputCollection in designtime, but the designer returns an error: Error at Data Flow Task [Uppercase [5910]]: The component "Uppercase" (5910) does not allow setting output column datatype properties. How do I enable the designer to accept designtime changes in the columncollection? Kind regards
You have to override the method SetOutputColumnDataTypeProperties in your component and implement it like this:
public override void SetOutputColumnDataTypeProperties(int outputID, int outputColumnID, Microsoft.SqlServer.Dts.Runtime.Wrapper.DataType dataType, int length, int precision, int scale, int codePage)
{
IDTSOutputCollection90 outputColl = this.ComponentMetaData.OutputCollection;
IDTSOutput90 output = outputColl.GetObjectByID(outputID);
IDTSOutputColumnCollection90 columnColl = output.OutputColumnCollection;
IDTSOutputColumn90 column = columnColl.GetObjectByID(outputColumnID);
column.SetDataTypeProperties(dataType, length, precision, scale, codePage);
}
No comments:
Post a Comment