Source Script Component using a flat file connection - System.ArgumentException: Empty pathname is not legal.

  • I am using a Foreach loop container to go thru all the files downloaded from the ftp site and I am assigning the file name of each file to a variable at the foreach loop level called filename.  In the dataflow task inside the foreach loop container, I have a source script component that uses a flat file connection.  The connection string of the flat file connection is set to the filename variable declared at the foreach loop level.  However the script component has a error System.ArgumentException: Empty pathname is not legal.

    Please let me know how to correct this?  The connectionString property of the flat file connection is set to the complete filename including the path.  Does a script component need to have a flat file name specified in the flat file connection that it is using?  I need to have a script source component as the flat file I am reading from is not in any of the standard formats.

    Any inputs appreciated. 

    PS:  I looked thru Jamie's blog at

    http://blogs.conchango.com/jamiethomson/archive/2005/05/30/1489.aspx

    when implementing the above package.

    Thanks,

    Manisha

  • Manisha,

    I think you should not indicate the complete filename path in the connectionstring property but only the folder path where the file is located.

    M.

Viewing 2 posts - 1 through 1 (of 1 total)

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