SSIS Flat File Source Error: 0xC020200E Cannot open the datafile and 0xC004701A failed the pre-execute phase

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.


Leave a Reply

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