Getting DataType of a IDTSCustomProperty90 object

Hi,
  I need to get the data type of a IDTSCustomProperty90 property. I can get a control flow DtsProperty data type by simply using the Type property (which returns a TypeCode) on the DtsProperty object. However, not able to find a similar property/method on a IDTSCustomProperty90.

Thanks,
-Suri


Answer this question

Getting DataType of a IDTSCustomProperty90 object

  • bebakhshid

    The custom property gets its data type from the data type of the value that is assigned to it, and (as you discovered) does not have a "fixed" data type property.

    -Doug

  • Christian2005

    Well, I can call IDTSProperty90.TypeConverter.GetTypeCode() to get the type!
  • SergioPereira

    IDTSCustomProperty90.ObjectType.GetTypeCode() is the answer!!!


  • laroj123

    This is mostly true but be aware that once a custom property's value is set then the type can not be changed.  So if the property is initially set to an Int32 then it can not be changed to something else.

    Matt

  • cuco

    People,
       I am still not able to get the datatype of the custom property. I thought that IDTSCustomProperty.TypeConverter.GetTypeCode() would do the needful however I realised that it will always return TypeCode.String.
      
       The DtsProperty.Type returns the correct datatype.

    -Suri

      


  • Getting DataType of a IDTSCustomProperty90 object