3 June, 2010
3 Comments
1 category
I was getting an error when importing a csv file, by using the SSIS Flat File Source.
Error
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.
Cause
This was because the flat file source connection string was created by an expression. The expression used a parameter and this parameter was empty.
Solution
When the parameter was filled with the correct value, eg “C:\Data\Test.csv”, the error was solved.
Tags: Integration Services
Category: Uncategorized
I had the same error and the file was opened in Excel, it was a CSV file with basic load package.
that was the issue for me as well. I had the file open in Excel. Closed it, it was fine.
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