Increment a Variable Value in SSIS ScriptComponent

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
Dim Counter As Integer
Public Sub New()
Counter = 0
End Sub
Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
Counter += 1
Row.NewTenorID = Counter
End Sub
Public Overrides Sub PreExecute()
Counter = Variables.MaxTenorID
End Sub

End Class

Tags: , ,

Friday, March 2nd, 2012 SSIS

No comments yet.

Leave a comment

You must be logged in to post a comment.