Variable Location on Input Table

  • I have a flat file manager that I have set up to connect to different files in different directories based on a package variable. The directory string pointing to where the file manager is to look is in an xml file. When I try to perform a xml task to read the xml file and assign the directory string to the package variable and run it I receive the following errors:

    [Flat File Source [16]] Warning: The filename, directory name, or volume label syntax is incorrect.

    [Flat File Source [16]] Error: Cannot open the datafile "C:\Documents and Settings\sglunt\Desktop\export_test.txt ".

    Any ideas or better ways to do this? The package works correctly if I manually set the variable before running.

    Thanks.

  • If you're running this on the server, are you sure the relative path name is correct and that the account running the package has permissions to it?


    And then again, I might be wrong ...
    David Webb

  • Yes I'm sure those two things are correct. As I said if I set my variable equal to the same string in the xml file manually in Business Intelligence Development Studio it works. If I try to upload the string from the xml file it doesn't work.

  • Under what user are you running it on the server? Agent?

    I am assuming you can access the file when you are running under the same credentials as the SSIS package when it is run on the server?

    Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!

  • The Agent is on a domain user id. So yes when running on the same credentials I can open the file.

    I don't think that is the problem though. I think it might be some sort of problem in the xml task or some manipulation it does to the string before storing it in the variable.

    Any ideas? Even maybe another way to do the same thing?

  • If you hardcode the value into the connection, does it work then?

     

    If the variable is type string, it will not alter the value.

    I have used the XML task many many times and not had this problem.

    Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!

  • Yea it works if i hardcode the connection string into it. Also the variable is of type string. It's definitely an interesting problem. I've tried to quadruple check everything because I know it's going to end up being something stupid.

    Since it is Friday, Cheers indeed Crispin.

    Scott

  • very odd.

     

    You say you using a file connection. If you don't? How about trying to use the file connection to import a text file. Does that work?

    Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!

  • Another thought I had: Try and create a text file using a script task and the value obtained from the variable. if that does not work, it might at least give you a better error.

    Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!

Viewing 9 posts - 1 through 8 (of 8 total)

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