Confused about FlatFile Connection Manager Error

  • I'm getting this error on my package "A valid file name must be selected". Here is why this confusing to me. In the Flat File Connection Manager Editor I navigate to the location where I want the file to go "C:\Documents and Settings\myName\My Documents\Visual Studio 2008\Projects\PLL\PLL\Destination\ff_all_cpy.txt". I can't seem to enter or even selecting this file name when I get this error. The "OK" button is disabled. If I change the file name to something elese then the "OK" button is then enabled.

    I then execute the package, it works. But, if try to execute again (I have overwrite file on the destination), I get the same error "A valid file name must be selected". I seems to have delete the files before hand in order to have it work. Deleting the files is a wrong solution, if overwrite file flag is set.

  • This sounds kind of like a permissions issue, although why you wouldn't have permission to your documents folder I don't know. Are you runnning from BIDS or deployed and running from a server?

    As a general matter of practice I would not recommend using your documents folder for files. When the package is deployed to a server, the server will not be able to find files on your local drive. I would suggest using a file share where permissions are not really an issue. Also I would recommend using UNC path names rather than letter path names such as \\servername\filepath rather than f:\FilePath because not all servers have the same drive mapping as your PC.

  • I'm running BIDS from my own PC for now. When I'm done the package will be executed on a server through command line. I agree that permissions sounds like the problem, but the fact is run once the files are placed in the folder with no problem. It's the second time I try to execute, or attempt to alter the File Manager Connection is when the error is raised.

    Interesting though, I just tried putting the file in another location like C:\Users\myname\Destination and it works now and repeatly. Was it the length of my initial path where the file was?

  • I doubt it was a length issue, I have used some pretty long file paths. I also wonder if there might have been an issue with the spaces in the path.

  • It's worth using a variable to hold the path for the flat file connection and then using Expressions in the flat file connection manager properties to set the connection string property to the variable value plus the file name in quotes (test for correctness with the Evaluate expression button).

    That way it is easier to change when you move to another server.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply