Database Reference
In-Depth Information
We'll begin by creating a simple SSIS package to use for demonstration purposes.
Building the Demonstration SSIS Pack-
age
Create a new SSIS solution named
Chapter2
. Rename the SSIS package, changing the
name from
Package.dtsx
to
Chapter2.dtsx
.
Tip
For more information on creating SSIS solutions and packages, see
Professional
SQL Server 2014 Integration Services
by Michael Coles and Francis Rodrigues
(Apress, 2012)
.
Drag a script component onto the control flow canvas and open the editor. Choose
your language of choice in the ScriptLanguage property on the Script page. Select the
System::PackageName
variable in ReadOnlyVariables, and then click the Edit
Script button.
If you selected Microsoft Visual Basic 2010 as the ScriptLanguage property setting
for the Script task, replace the code in
Public Sub Main()
with the following:
Public Sub Main()
Dim sPackageName As String
= Dts.Variables("PackageName").Value.ToString
Dim sMsg As String = "Package Name: "& sPackageName
MsgBox(sMsg, , sPackageName)
Dts.TaskResult = ScriptResults.Success
End Sub
If you selected Microsoft Visual C# 2010 as the ScriptLanguage property setting
for the Script task, replace the code in
public void Main()
with the following :
public void Main()
{
Search WWH ::
Custom Search