September 8, 2010 at 11:14 pm
Hello guys, i have created an ssis packages that loops through files and processes them to a sql server database, i have a variable which reads the connection string of the files and substrings a part of the connection string and stores it also in the database.
i want to find a way for the variable expression to be able to be updated with the current value using a script component does anyone have any ideas and example of the script in the script component is shown here
Public Sub Main()
'
' Add your code here
'
Dim fileDateChange As String
Dim callFileDate As String
fileDateChange = Dts.Variables("ExcelFile").Value
callFileDate = fileDateChange.Substring(33, 7)
Dts.Variables("FileDate").Value = callFileDate
Dts.TaskResult = ScriptResults.Success
End Sub
End Class
the Dts.variables("ExcelFile).value is my readonlyvariable
and dts.variable("FileDate").value is my readwritevariable in the script component general page
Thanks any help is appreciated
September 9, 2010 at 4:11 am
Create an Execute SQL Task and Pass the varaible values as Parameter for an Procedure.
In the Procedure do the sql code to reflect the Changes.
September 9, 2010 at 12:35 pm
hey thanks for the info could you shed more light on it by giving me an example specifically
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply