title: How to configure error logging at Source level in a Data Flow Task of SSIS
body: <p>How to configure error logging at Source level in a Data Flow Task of SSIS?</p>
  
  <p>Sample script used in the example.</p>
  
  <pre><code>create table test_data (col1 int, col2 varchar(100))
  
  insert into test_data values (1, '00 0');
  insert into test_data values (2, '02');
  </code></pre>
  
  <p>OLE DB Source SQL Command with following query</p>
  
  <pre><code>select * from test_data where col2=0;
  </code></pre>
  
  <p>This query fails</p>
  
  <p>Destination is a flat file.</p>
  
  <p>During execution following error is reported.</p>
  
  <blockquote>
    <p>OLE DB Source [1] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB
    error has occurred. Error code: 0x80040E07. An OLE DB record is
    available. Source: "Microsoft SQL Server Native Client 10.0" Hresult:
    0x80040E07 Description: "Conversion failed when converting the varchar
    value '00 0' to data type int.".</p>
  </blockquote>
  
  <p>I am getting above error when I run the package.I know the query is not correct but I am not intended to change the source query, this is sample derived from my application.</p>
  
  <p>In order to log this error to a LOG file by specifying a location, what I should do?</p>
  
  <p>I tried using the error output but that handles the errors only on the data coming from Source but not with the query.</p>