title: ct_results() and ct_cmd_drop() error with Sybase::CTlib
body: <p>I'm using <a href="http://search.cpan.org/perldoc?Sybase%3a%3aCTlib" rel="nofollow">Sybase::CTlib</a> to query a Sybase server. However when I execute the following:</p>
  
  <pre><code>while( $dbr-&gt;ct_results($restype) == CS_SUCCEED ) {
      if( $restype == CS_CMD_FAIL ) {
      warn "Update Check Failed...";
      next;
      }
      next unless $dbr-&gt;ct_fetchable($restype);
      $ts = $dbr-&gt;ct_fetch;
  }
  </code></pre>
  
  <p>My query returns exactly one value. Thats why I'm reading into one variable.</p>
  
  <p>I'm getting errors:</p>
  
  <blockquote>
    <p>Open Client Message:<br>
    Message number: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (163)<br>
    Message String: ct_results(): user api layer: external error: This routine cannot be called until all fetchable results have been completely processed.</p>
    
    <p>Open Client Message:<br>
    Message number: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (159)<br>
    Message String: ct_cmd_drop(): user api layer: external error: This routine can be called only if the command structure is idle.</p>
  </blockquote>
  
  <p>What's going wrong?</p>