Reputation: 53
I have an SSIS package with a C# script component. The script processes some documents and extracts information to several SQL tables. Combining the tables is not an option. The script runs perfectly aside from taking a long time to process all the files. Each file contains the date they were last modified, my solution is to store that date in a SQL table and then the next time the package is run to retrieve the previous dates and compare. If a file has not been modified then the date will be the same and the file skipped.
Unfortunately I am unable to figure out how to bring in the SQL table. The connections and script component settings appear to be correct but my C# code does not work. Ideally I would like to bring the table in as either a dictionary or list. The table itself consists of only two columns: file name, last modified date.
Upvotes: 2
Views: 1577
Reputation: 37358
Follow this steps:
Add a Execute SQL Task
in which you select all data from the Date Table
Select * From [Table]
Store the result in a Object Variable by selecting it as ResultSet
For more information, read the following detailed articles:
Upvotes: 2