January 2, 2008

SSIS Script Component throws "Object reference not set to an instance of an object"

In Integration Services 2005, if you get an Object reference not set to an instance of an object exception when trying to manipulate rows from a Script Component, even after you have guaranteed that the column is set as an input for the script, try checking if the column you're accessing is not null, using the automatically available "_IsNull" property. For example, if the input column is called myInputCol, you can try something like this:
If Not Row.myInputCol_IsNull Then
'code that access the column here
End If

No comments: