OK, here is my problem.
In SSIS, I am using a foreach loop to iterate through a bunch of Excel files to load the data into one of my tables. There are two steps in the loop, one to load the file into the table, the other to move the file into a "Processed" folder. When I run the package it searches the directory for a file and finds "File A", loads it and moves it in the "Processed" folder. Then it loops and finds "File B", it reloads "File A" and moves "File B" into the "Processed" folder, and so on, loading "File A" such that if I have 10 files to load, it will load "File A" 10 times. How can I get the loop to release the previous data source in favor of the new one. The foreach loop gets the fully qualified path of the file and loads it into a variable ("Filename") and "Filename" is then used to populate the Excel File Path of the connection manager in the loop.
Any ideas?
↧