Error Handling in SSIS

  • Hello, Great article.

    Actually the initial article is missing an "&".

    I am having some issues with it though.

    I tried debugging it and it fails on:

    Dim objColumn As Object = columnValue.GetValue(Row, Nothing)

    It never gets to 13 message. This is on a Date column that is NULL.

    I see there is a check like "If IsNothing(objColumn) " but it does not even get to that point.

    This is the piece of code that is failing at.

    ------------------------------------------------------------------

    If Not (strAttributeName.Contains("ErrorCode") Or strAttributeName.Contains("ErrorColumn")) Then

    ' get the value for the column

    MsgBox("11")

    columnValue = rowType.GetProperty(strAttributeName)

    MsgBox("12")

    Dim objColumn As Object = columnValue.GetValue(Row, Nothing)

    MsgBox("13")

    ' if the value is null set to empty string

    If IsNothing(objColumn) Then

    MsgBox("21")

    strValue = String.Empty

    MsgBox("22")

    Else

    MsgBox("31")

    strValue = objColumn.ToString()

    MsgBox("32")

    End If

    ' append the node to the xml string

  • Matteo,

    What version of SSIS are you using? This article was written a long time ago and the code even longer using SSIS 2005. There may be changes somewhere that need to be addressed. I haven't looked at this code in at least 5 years. If I have some time tonight after work I can possibly look into what you are seeing.

  • Thanks for the quick reply. The version I am using is 2008 R2.

    I can get it to work if I can wrap that statement in a Try Catch but I was wondering what makes it fail.

Viewing 3 posts - 106 through 107 (of 107 total)

You must be logged in to reply to this topic. Login to reply