Is it possible to set up variables in a Foreach Loop for a Bulk Insert Task?
The Bulk Insert Task works fine without using a variable. But I have many file so I need to set the variable inside the Foreach Loop to read files one by one.
Everything I've tried keeps failing. I set my Destination and Source connections and then in the Bulk Insert Task Editor set up the expression with the variable that I have decalared (str_SourceFullName), and then set the bulk
insert task delayValidation property to true and it keeps failing...I have tried almost changing every setting but it does not pick up the value of the variable.
I even tried to using an ActiveX Script Task by using the following script to pick up the variable, but the ActiveX Script errors out as well. Here is the ActiveX code:
Dim connmgr As ConnectionManager = Dts.Connections("Dialog2010.txt")
connmgr.ConnectionString = Dts.Variables("User::str_SourceFileName").Value.ToString()
Has anyone had this problem?
View Complete Post