I have a for each loop container in my ssis package where i loop through the files in a folder, (1) draw the data, (2) get the file creation date and use it as a (3)derived column and (4)insert all the info into a table I cannot seem to bind the creation date to the variable created, FileDate
Public Overrides Sub PostExecute() MyBase.PostExecute() Dim fileinfo As FileInfo Dim current As String = Me.Variables.Current fileinfo = New FileInfo(Current) Me.Variables.FileDate = fileinfo.CreationTime End Sub
In the package i have a flat file source, next i have the script component, then a derived column and lastly the destination table
What am i doing wrong? I am trying the insert a picture of what i have but not sure how to
What static value date? I can see from your code that you pull the date from the FileInfo object and assign it to your variable. If you put pre- and post-execution breakpoints on your script component, what is in the variable before and after the script component executes?
I removed the Script Component from the Data Flow and created a Script Task in front of the Data Flow in the loop container It is assigned to my variable correctly Thank you gbritton, i will be asking many questions as scripting in ssis is new to me