ella
ella

Reputation: 183

ssis import file with dynamic name

I tried to create a SSIS package to input excel file into database. The excel file has dynamic name, and also i need to add filename into the database as well.

What I'm trying to do:

  1. use for each file loop to set a variable called FileFound, with the value of the filename (with full path)
  2. set connection for the input file with above variable
  3. use data load to load the excel to db, with above connection.

I got error saying the connection is invalid.

enter image description here enter image description here

@Admin, I tried to upload 2 images, and I got 2 image urls but they are not working. can you please check?

https://i.sstatic.net/THtMd.jpg https://i.sstatic.net/zApQf.jpg

Upvotes: 1

Views: 731

Answers (1)

KeithL
KeithL

Reputation: 5594

There is step you missed when using dynamic file names in a foreach loop. You need to set delay validation property of the dynamic source (in your case the Excel Conn) to TRUE.

The package tries to validate in pre-execute phase unless you delay it.

Upvotes: 0

Related Questions