title: sqlsrv_query returns false without any error (sqlsrv_errors())
body: <p>We have to execute an MSSQL stored procedure in order to insert a set of rows and return the result. The procedure is working perfectly as intended when executed inside the Microsoft SQL Server Management Studio. But it's not working when executed with <code>sqlsrv_execute</code> or <code>sqlsrv_query</code> in PHP. It's inserting only one row and returning no rows.  </p>
  
  <p>The Stored Procedure can be found <a href="http://pastebin.com/21FMNdat" rel="nofollow noreferrer">Here</a></p>
  
  <p>The PHP code is </p>
  
  <pre><code>//Here my SP required one argument. so i passed one argument. this @param and stored procedure argument name should be same(case sensitive)
  $sql = " { call ResmaxCompareWithProduction ( ?,? ) } ";
  $param1 = 'All';
  $param2 = 'desk';
  $params = array(array(&amp;$param1, SQLSRV_PARAM_IN),array(&amp;$param2, SQLSRV_PARAM_IN));
  $stmt = sqlsrv_prepare($conn,$sql,$params);
  
  if ($stmt===false) {
      // handle error
      print_r(sqlsrv_errors(),true);
  }else{
      if (sqlsrv_execute($stmt)===false) {
          // handle error. This is where the error happens
          print_r(sqlsrv_errors(),true);
      }
      else    
      {   
          $resultsetarr = array();
          while($row = sqlsrv_fetch_array($stmt)){
              $resultArray[] = $row;
          }
          print_r($resultArray);
          // success! It never gets here, though.
      }
  }
  </code></pre>
  
  <p>I tried to var_dump the result the procedure returned and it output <code>resource(4) of type (SQL Server Statement)</code></p>
  
  <p>The sqlsrv_errors() returns <code>NULL</code></p>
  
  <p><code>sqlsrv_fetch_array</code> returned <code>boolean(false)</code></p>
  
  <p>I even tried using <code>sqlsrv_query</code> instead of <code>sqlsrv_prepare</code> and <code>sqlsrv_execute</code>, but same result.</p>
  
  <p>Could you guys help me figure out what the issue is and make the procedure run as intended. </p>