Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

How to handle the read only Custom Properties like 'Column Type' while Creating SSIS Package Programmatically

$
0
0

Hi,

I am trying to create the fuzzy grouping transformation using VB .Net. But output alias for the Similarity score does not come. So i tried to add the Similarity output columns to Output Columns of fuzzy grouping transformation. But i encountered a problem with the following exception,

Exception from HRESULT: 0xC0204019


My code is,


Dim fuzzyGrpInputCollection As IDTSInput90 = fuzzyGroupTrans.InputCollection(0) 
        Dim fuzzyGrpInputCols As IDTSInputColumnCollection90 = fuzzyGrpInputCollection.InputColumnCollection 
 
        Dim fuzzyGrpOutput As IDTSOutput90 = fuzzyGroupTrans.OutputCollection(0) 
 
 
        For Each inputColumn As IDTSInputColumn90 In fuzzyGrpInputCols 
 
            If (inputColumn.Name = "Employee Name") Then 
 
                Dim fuzzyOutputCol As IDTSOutputColumn90 = _ 
                fuzzyGroupTransInstance.InsertOutputColumnAt(fuzzyGrpOutput.ID, 0, "_Similarity_" _ 
                & inputColumn.Name, "Similarity score " & inputColumn.Name) 
 
                Dim fuzzyGrpCustPropCollec As IDTSCustomPropertyCollection90 = _ 
                fuzzyOutputCol.CustomPropertyCollection 
 
                fuzzyOutputCol.CustomPropertyCollection(0).Value = 2 
                fuzzyOutputCol.CustomPropertyCollection(1).Value = inputColumn.ID 
 

                'Read only property error 
                'fuzzyOutputCol.DataType = Microsoft.SqlServer.Dts.Runtime.Wrapper.DataType.DT_R4 
                'fuzzyOutputCol.CodePage = 10 
 
 
              'Here i got the Exception from HRESULT: 0xC0204019 and This code has called into  another function. When that function is finished, this is the next statement that will be executed. 
                fuzzyOutputCol.SetDataTypeProperties(Microsoft.SqlServer.Dts.Runtime.Wrapper.DataType.DT_R4, _ 
                ("_Similarity_" & inputColumn.Name).Length(), inputColumn.Precision, inputColumn.Scale, inputColumn.CodePage) 'Code Page  : 1252) 
 
                fuzzyGroupTransInstance.SetOutputColumnProperty(fuzzyGrpOutput.ID, inputColumn.ID, _ 
                "SourceInputColumnLineageId", inputColumn.ID) 
 
            End If 
 
    Next 
 


Pleas help me. I am spending lot of time with this issue.




Thanks,


Jaffar Rabeek

BI Developer






Viewing all articles
Browse latest Browse all 24688

Trending Articles