title: PDO::MYSQL_ATTR_USE_BUFFERED_QUERY error occuring while calling stored procedure in zf2
body: <p>when calling a stored procedure in zend framework 2 , it throwing an error message, how can i solve this issue , </p>
  
  <pre><code>$dbAdapter = $e-&gt;getApplication()-&gt;getServiceManager()-&gt;get('Zend\Db\Adapter\Adapter');
      $results = $dbAdapter-&gt;query("CALL PROCEDURE_NAME('PARAM1')");
      $DataSource = $results-&gt;execute();
      $Statement = $DataSource-&gt;getResource();
      $Result = $Statement-&gt;fetchAll(\PDO::FETCH_OBJ);
  </code></pre>
  
  <p>the above code is using to get stored procedure information</p>
  
  <p>getting below error</p>
  
  <p>Statement could not be executed (HY000 - 2014 - Cannot execute queries while other unbuffered queries are active.  Consider using PDOStatement::fetchAll().  Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.)</p>