Read Object variable inside SSIS Script Component


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 CreateNewOutputRows()
Dim olead As New Data.OleDb.OleDbDataAdapter
Dim dt As New Data.DataTable
Dim row As System.Data.DataRow

olead.Fill(dt, Me.Variables.ObjTradeFeedData)

For Each row In dt.Rows
With Output0Buffer
.AddRow()
.TradeID = row("TradeID").ToString
.BookName = row("TradeBook").ToString
.PortfolioID = row("TradePortfolioID").ToString
.IssuerSDSID = row("UnderlyingSDS").ToString
.CreditRiskCurveId = row("CreditRiskCurveId").ToString
.Currency = row("Currency").ToString
.ValuationDate = row("ValuationDate").ToString
End With
Next
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.