I was getting an error when importing a csv file, by using the SSIS Flat File Source.



Error: 0xC020200E at Read Flat File [18]: Cannot open the datafile "".
Error: 0xC004701A at Import File, SSIS.Pipeline: component "Read Flat File" (18) failed the pre-execute phase and returned error code 0xC020200E.



This was because the flat file source connection string was created by an expression. The expression used a parameter and this parameter was empty.



When the parameter was filled with the correct value, eg “C:\Data\Test.csv”, the error was solved.


  1. This error also occurs when the parameter in the configure option is copied with a little space in it. The error would be like cannot open the data file or xyz.txt file is missing from the path specified eg :-“C:\Test\data xyz.txt”, notice how there is a space after the file path, which results in the error

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.