title: error calling stored procedure with output parameter in groovy
body: <p>...... I found the reason - the problem was there was actually a select in a stored proc that was called from my stored proc which I didn't notice. After removing it everything worked fine.</p>
  
  <p>I call a stored procedure from my code, it has one input and one output parameter. For some reason it gives me an exception, not sure what the problem is, here is the code:</p>
  
  <p>int fileNumber</p>
  
  <pre><code>sql.call("{call initIMAGINE_IDENTIFIERS_DELTAS(?, ?)}", [type, Sql.INTEGER]){ number -&gt;
      fileNumber = number
  }
  </code></pre>
  
  <p>and here is the declaration of stored proc: </p>
  
  <pre><code>create procedure initIMAGINE_IDENTIFIERS_DELTAS
  @reportType  varchar(30) = '',
  @loop_id int output 
  as
  BEGIN
  </code></pre>
  
  <p>the error I get: </p>
  
  <pre><code>Oct 30, 2014 11:18:16 AM groovy.sql.Sql callWithRows
  WARNING: Failed to execute: {call initIMAGINE_IDENTIFIERS_DELTAS(?, ?)} because: Output parameters have not yet been processed. Call getMoreResults().
  Caught: java.sql.SQLException: Output parameters have not yet been processed. Call getMoreResults().
  java.sql.SQLException: Output parameters have not yet been processed. Call getMoreResults().
          at net.sourceforge.jtds.jdbc.ParamInfo.getOutValue(ParamInfo.java:159)
          at net.sourceforge.jtds.jdbc.JtdsCallableStatement.getOutputValue(JtdsCallableStatement.java:124)
          at net.sourceforge.jtds.jdbc.JtdsCallableStatement.getObject(JtdsCallableStatement.java:315)
          at Test.init(SqlConnection.gy:26)
          at Test$init.call(Unknown Source)
          at SqlConnection.run(SqlConnection.gy:9)
  </code></pre>
  
  <p>The same code actually works against Sybase 15.1 in 12.5 compatibility mode but doesn't work against Sybase 15.7. I am using jtds 1.3.1 driver.</p>