title: SSIS truncation error when column length is more than enough
body: <p>I have a .csv flat file which I am trying to import using flat file source in a data flow. I am getting truncation errors which do not seem possible. As far as I can tell the specified column lengths are more than enough for all of the data.</p>
  
  <p>For instance, the error I am currently looking at is:</p>
  
  <blockquote>
    <p>[FF_SRC Unicode File [237]] Error: Data conversion failed. The data conversion <strong>for column ""MIC""</strong> returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".</p>
  </blockquote>
  
  <p>and</p>
  
  <blockquote>
    <p>[FF_SRC Unicode File [237]] Error: An error occurred while processing file "C:[file path]" on <strong>data row 14</strong>.</p>
  </blockquote>
  
  <p>The entry for column MIC in data row 14 is "varuna". The column MIC is set to length 100 in the connection manager and the external and output columns of the flat file source.</p>
  
  <p>I have verified that the column widths specified in SSIS are more than enough for all of the incoming data. I opened the .csv in excel and got the max length for each column and rounded it up. I verified that excel did not change the data (there was one column for which it did and I have accounted for that).</p>
  
  <p>I verified these values in the advanced tab of the connection manager and the "input and output properties" of the flat file source component for external and output columns. </p>
  
  <p>When I run the package, it will fail due to a truncation error. It tells me the column. I verify that length specified is more than enough for that column, but then increase it anyway. When I run it again it will pass the particular value that caused the error (the one I just "fixed") but fail a few values later. There is no particular column or row causing the issue.</p>
  
  <p>I even set the length to 100 for every column expect one, which should be way more than enough. (The one exception column is set to length 400 because it's values are usually 200-300 characters. This column has never caused me an issue). The longest value in the file outside of the 400 character column is 42 characters. </p>
  
  <p><strong>Edit:</strong> After setting the column lengths to 1000 the package runs successfully. I still can't explain why 1000 would work when 100 did not, both of them should be more than double what is necessary. I don't consider this a solution because I would rather not waste that memory.</p>