Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

SSIS scenarios...
Browse by Tags · View All
MSBI 30
SSIS 27
BRH 15
SQL Server 15
#BI 14
Script Component 9
#SQLSERVER 8
#SQL Server 7
Flat File Source 5
Script Component Source 5

Archive · View All
August 2010 4
March 2011 3
September 2010 3
February 2013 2
June 2011 2
November 2010 2
May 2010 2
November 2009 2
March 2010 2
May 2012 1

SSIS - Assigning variables in Script Component

Jan 12 2010 12:34PM by Sudeep Raj   

One of the sore points of using Script component is assigning value to variables.
Read Write variables can only be altered in Post Execute phase. Script Component runs the code for each record and this would affect performance adversely. For details check "Coding and Debugging the Script Component".
In case I need to assign the value of system variable "PackageName" to a readWrite user variable "PkgNm". You could use it in several other ways. Assigning values from Source to a variable for instance.

Here is a sample code to assign value to Read write variable on the post execute phase:

Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
ImportsMicrosoft.SqlServer.Dts.Runtime.Wrapper
Public Class ScriptMain
    Inherits UserComponent
    Public Overrides Sub CreateNewOutputRows()
       ' I have not added any code here
    End Sub
    Public Overrides Sub PostExecute()
        Me.Variables.PkgNm = Me.Variables.PackageName
        Msgbox(Me.Variables.PkgNm)
        MyBase.PostExecute()
    End Sub
End Class

 

Tags: SSIS, Script Component, Post Execute, SQL Server, MSBI,


Sudeep Raj
12 · 13% · 4306
0
Liked
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

Your Comment


Sign Up or Login to post a comment.

    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]