title: Varchar(number) causes failure in SSIS
body: <p>I'm developing a pretty straightforward SSIS package: run a stored procedure to export data from a variable table directly into a flat file destination. Originally, each column in the variable table was defined as <code>varchar(max)</code>, worked fine so far. For improve the performance, I decided to apply constraint to the variable table, which is not compatible with varchar(max) and I had to assign a certain number to it, e.g. <code>varchar(10)</code>. After this change, this SSIS suffered from a series of error:</p>
  
  <pre><code>Error: 0xC0202009 at ESP AL Extract, OLE DB Source [835]: An OLE DB error has
  occurred. Error code: 0x80040E21.
  An OLE DB record is available.  Source: "Microsoft SQL Native Client" 
  Hresult: 0x80040E21  Description: "Multiple-step OLE DB operation generated
  errors. Check each OLE DB status value, if available. No work was done.".
  Error: 0xC0208265 at ESP AL Extract, OLE DB Source [835]: Failed to retrieve
  long data for column "SR_RequestID".
  Error: 0xC020901C at ESP AL Extract, OLE DB Source [835]: There was an error 
  with output "OLE DB Source Output" (846) on component "OLE DB Source" (835).
  The column status returned was: "DBSTATUS_UNAVAILABLE".
  Error: 0xC0209029 at ESP AL Extract, OLE DB Source [835]: The "output
  "OLE DB Source Output" (846)" failed because error code 0xC0209071 occurred,
  and the error row disposition on "component "OLE DB Source" (835)" specifies 
  failure on error. An error occurred on the specified object of the 
  specified component.
  </code></pre>
  
  <p>The flat file columns data type is <code>string[DT_STR]</code>. Any thought is appreciated.</p>