title: SSIS: passing sql command as variable to ole db source
body: <p>I have created 2 variables in SSIS, namely ProductValue and SQLQuery. The SQLQuery contain the sql statement as below:</p>
  
  <pre><code>"SELECT * FROM Products Where ProductID &gt; " + @[user::ProductValue]
  </code></pre>
  
  <p>When I pass the SQLQuery variable to Ole db source via data access mode = <em>sql command from variable</em>, system return the error messages as below:</p>
  
  <pre><code>Error at Data Flow Task [OLE DB Source [1]]: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E14.
  An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80040E14  Description: "Statement(s) could not be prepared.".
  An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80040E14  Description: "Incorrect syntax near '+'.".
  </code></pre>