SQLTeam.com | Weblogs | Forums

Flat File Connection keeps failing

I've Inherited an old SSIS package and am currently trying to move it to a proper SSIS solution/project. Everything seems ok apart from the dynamic connections which I can't get to work. The error is "The file name "\Server\Folder2\Folder1\Filename1_" specified in the connection was not valid"

The dynamic connection is specified as follows, which puts rundate on end:

"\\Server\Folder2\Folder1\Filename1_"+ @[User::RunDate]

There is a dynamic expression for the file location so I'm a bit confused as to what the defined flat file connection should be. I created a couple of files with just the column headers to create the static connection mapping, however, once you connect to it an then close the connection manager, then reopen it, it has reverted to the old connection and says "a valid file name must be selected."
at the bottom.

I've turned off DelayValidation and tried changing Unicode setting to True on one of the connections to no avail.

Any thoughts on what should be defined for the static connection in the connection manager if using a dynamic connection for the output file?



looks like a permission issue.
Can you access the file from that machine?

Yes, no problems with accessing it, although I have just noticed the file folder is read-only.

I think some where in your process is updating @[User::RunDate]. I have seen this before with one of my dtsx last week. I put in a static value for the time being.

looks like you do not have an extension for the file

I Think that @yosiasz is onto the problem... What is the actual name of the file that you're trying to import including the extension?

It has now decided to fix itself, the job has no errors and it runs ok. I was wondering if the template files I used to initiate the static connection could be kept in place or removed, because the job also places the created files with date added onto file name versions. It did change the delay validation of the connections to true, so that it wasn't erroring out when the static connection was assessed. Guess that just took a bit of time to come through the settings in the project.