title: Error while using Stored Procedure with dynamic sql in SSIS OLE-DB source
body: <p>I have a SSIS package which uses a stored procedure with dynamic SQL as OLEDB source. When I execute the package, I get this error</p>
  
  <blockquote>
    <p>Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80004005
    Description: "The metadata could not be determined because statement
    'exec sp_executesql @sqlStr' in procedure 's_offc_cap_st_rpt_efile' 
    contains dynamic SQL.  Consider using the WITH RESULT SETS clause to
    explicitly describe the result set.".</p>
  </blockquote>
  
  <p>The <code>Oledb source</code> configuration looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/t8yHO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/t8yHO.png" alt="enter image description here"></a></p>
  
  <p>What is the reason for this error? Could someone help me find a solution for this issue?</p>