Hi,
I am building a custom component have a IDTSCustomProperty90 property that can take the value 'True' or 'False'.
Depending on its setting, I want to include (or not include) a column in the output.
Any advice on how to go about doing this (with some sample code) would be much appreciated!
Here's how I'm declaring the property in ProvideComponentProperties()
IDTSCustomProperty90 IncludeErrorDesc = ComponentMetaData.CustomPropertyCollection.New(); IncludeErrorDesc.ExpressionType = DTSCustomPropertyExpressionType.CPET_NONE; IncludeErrorDesc.Name = "Some Name"; IncludeErrorDesc.TypeConverter = typeof(Boolean).AssemblyQualifiedName; IncludeErrorDesc.Value = Convert.ToBoolean(false);Thanks in advance
-Jamie
Implement SetComponentProperty method in your component and if the property is set to true add your column, otherwise find it in the collection and remove it.
I do not have a time to build you a sample, but give it a try and let us know if it does not go well.
BTW, you do not need the following line from your sample:
IncludeErrorDesc.TypeConverter = typeof(Boolean).AssemblyQualifiedName;Thanks.
|||Hi Bob,I nevre replied to this. Just wanted to say thanks for this - it worked a treat!
-Jamie|||
You are welcome, Jamie. I am glad it worked out.
No comments:
Post a Comment