I have a problem with script task.
I have a Package where Foreach Loop Container contains Skriptask that creating Sql Statment into Variable. Variable is defined early and contains default value
When after execution SkriptTask I`m trying to create DataFlow (OLEDB source) which has to get SqlStatment from Variable, but actually OLEDB is getting default value from Variable and not the new one from Script.
Is where any options what I miss?
Thanks a lot!
Update:
Case "feed" MsgBox("FEED") If CStr(Dts.Variables("ExecutionFlag").Value) = "1" Then Dts.Variables("FEED").Value = "SELECT [SymbolName] ,[Bid],[Ask],[TickTime],[server],[ServerID],[LastUpdate] FROM FEED where cast( " & ColumnDateFilter & " as date) between '" & FromDate & "' and '" & ToDate & "'" MsgBox(Dts.Variables("ExecutionFlag").Value.ToString) ElseIf CStr(Dts.Variables("ExecutionFlag").Value) = "0" Then Dts.Variables("FEED").Value = " SELECT [SymbolName] ,[Bid],[Ask],[TickTime],[server],[ServerID],[LastUpdate] FROM FEED" End If