swat
swat

Reputation: 79

Handling null values in SSIS

In my Script Componet task in SSIS i am getting null value encountered error for a column.my database allows this column to be null but ssis doen not

Upvotes: 1

Views: 1276

Answers (1)

Yahfoufi
Yahfoufi

Reputation: 2544

If your column is an input in the script component you have to use _IsNull property to check it and if it is an output you have to use the same property to assign a null value to it.

i.e.

Assume inColumn (input) , OutColumn (Output), (i used vb.net)

If Not Row.inColumn_IsNull Then ' check if value is not null
    ' Do something
    '...
    Row.OutColumn = value
Else
    Row.OutColumn_IsNull = True 'Assign a null value to the output
End If

Upvotes: 1

Related Questions