title: SSIS 2005 flat file source - partial row which isn't actually a partial row
body: <p>I'm currently working on an SSIS package to load mainframe logs from multiple server/file sources into a database.</p>
  
  <p>As it stands at the moment I'm using a foreach loop container to loop through a recordset containing filenames and load the files using a <code>Data Flow</code> task from a <code>Flat File Source</code> and <code>File</code> connection to an <code>OLE DB Destination</code> through a Derived column.</p>
  
  <p>I've built in error handling on the <code>Data Flow</code> task to allow for the fact that there won't always be a log file in the location specified (ie. because the server was down for maintenance during a specific period as the files are generated on an hourly basis), but the problems start after it finishes handling these errors.</p>
  
  <p>If the file immediately following an attempt to load a file that wasn't found exists it begins to load it but then throws the following warning message: <code>[Message Log File Source (NORDXSL) [57]] Warning: There is a partial row at the end of the file.</code>, and doesn't load all of the records in that file.</p>
  
  <p>However, when I remove the files I know won't exist from the recordset (so that it only attempts to load files that do exist, including the one with the alleged "partial row"), everything works fine and all files/rows are loaded without a problem. It just seems to not want to load the first file after it's failed a missing file correctly and I can't for the life of me work out why?</p>
  
  <p>I've tried calling <code>Dispose()</code> and <code>ReleaseConnection()</code> on the file connection after the <code>Data Flow</code> task has finished processing but this makes no difference and I'm now completely out of ideas.</p>
  
  <p>Any help would be really appreciated as this is the last bug in this project and I want to get it out the door. PLEASE!!</p>
  
  <p>Thanks,
  James</p>