Home Forums Data Warehousing Integration Services Refresh flat file source columns from change in Foreach Loop Container RE: Refresh flat file source columns from change in Foreach Loop Container

  • Luv SQL - Wednesday, March 7, 2018 1:04 PM

    I've deleted both my flat file source and ole db destination and re-added.  Since I'm using a ForEach Loop the flat file source references the flat file connection and not an individual file.  When I run it now after the changes, it no longer runs grrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr. The data flow is inside the forloop so am not sure why it doesn't work anymore.  

    Started:  2:49:31 PM  Error: 2018-03-07 14:49:32.13    
    Code: 0xC020200E     Source: Data Flow Task Flat File Source [2]     Description: Cannot open the datafile "".  End Error  Error: 2018-03-07 14:49:32.13    
    Code: 0xC004701A     Source: Data Flow Task SSIS.Pipeline     Description: Flat File Source failed the pre-execute phase and returned error code 0xC020200E. 
    End Error 
    DTExec: The package execution returned DTSER_FAILURE (1).  Started:  2:49:31 PM  Finished: 2:49:32 PM  Elapsed:  0.187 seconds.  The package execution failed.  The step failed.

    You've got that round the wrong way. The source component in your dataflow references the flat file source. The only way that you can process multiple files in a FEL like this is if the files all have the same format (Column names, number of columns, data types etc).

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.