Dear bro and sis,
How to writing a variable package from Script Component in DataFlow Task?
The case is :
I hava an XML file like this:
<?xml version="1.0" ?>
- <DTSConfiguration>
- <DTSConfigurationHeading>
<DTSConfigurationFileInfo GeneratedBy="BAMBANG\Administrator" GeneratedFromPackageName="Archive" GeneratedFromPackageID="{37A684FF-B82D-4B26-93FF-AACDD7A2BC86}" GeneratedDate="10/8/2009 10:07:34 AM" />
</DTSConfigurationHeading>
- <Configuration ConfiguredType="Property" Path="\Package.Variables[User::TimeID].Properties[Value]" ValueType="Int32">
<ConfiguredValue>9003</ConfiguredValue>
</Configuration>
</DTSConfiguration>
I want to write element <ConfiguredValue> to my variable TimeID in SSIS Package (the value is 9003).
To do this, I use XML Source and the output of XML Source is Configuration->ConfiguredValue which holds the value of 9003.
After XML Source, I use Script Component to write the output (from XML Source) into my SSIS variable (TimeID variable).
The script i wrote in ScriptComponent is like this one :
Public Class ScriptMain
Inherits UserComponent
Dim var As Short
Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
'
' Add your code here
'
var = CType(Row.ConfiguredValue, Short)
End Sub
Public Overrides Sub PostExecute()
Variables.TimeID = var
Windows.Forms.MessageBox.Show("test")
End Sub
End Class
The problem is, TimeID variable is never written 😀
How to do this actually?
Thanx for any solutions/reference 🙂