title: Assign value to SSIS Script Component new Output Column
body: <p>I'm sure this is a simple issue, but I'm trying to combine 2 columns into a new output column, but have not had any luck with it.  Each time I get an 'Object reference not set to an instance of an object.' error</p>
  
  <p>Here is my code:</p>
  
  <pre><code>Imports System
  Imports System.Data
  Imports System.Math
  Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
  Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
  
  Public Class ScriptMain
      Inherits UserComponent
  
      Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
          '
          ' Add your code here
          '
          Dim tmpStr As String
          tmpStr = ""
          If Not IsNumeric(Row.addrmap.ToString) Then
              tmpStr = Row.addrmap.ToString.Substring(Row.addrmap.ToString.Length - 2, 1)
              tmpStr = Row.addrmap.ToString.Remove(Row.addrmap.ToString.Length - 2, 1).PadLeft(3, CChar("0")) &amp; " " &amp; tmpStr.PadLeft(3, CChar("0")) &amp; " " &amp; Row.addrpar.ToString
  
          Else
              tmpStr = Row.addrmap.ToString.PadLeft(3, CChar("0")) &amp; " " &amp; "000 " &amp; Row.addrpar.ToString
          End If
          Row.addrMapPar = tmpStr
      End Sub
  
  End Class
  </code></pre>
  
  <p>Thanks for the help!</p>