title: java.sql.SQLException: Invalid state, the ResultSet object is closed
body: <p>I am trying to run StoredProcedure using jtds.
  My database is on SQL SErver 2008</p>
  
  <pre><code>private String DRIVER_NAME_VALUE = "net.sourceforge.jtds.jdbc.Driver";  
  private String URL_VALUE = "jdbc:jtds:sqlserver://"; 
  ...
  cstmt =dbConnection.getCallableStatement("{? = call dbo.GetAgentStats (?)}");
  .
  .
  .
  rs = cstmt.executeQuery();
  </code></pre>
  
  <p>when trying to go over the Result set I got the Exception:</p>
  
  <pre><code>java.sql.SQLException: Invalid state, the ResultSet object is closed.
          at net.sourceforge.jtds.jdbc.JtdsResultSet.checkOpen(JtdsResultSet.java:299)
          at net.sourceforge.jtds.jdbc.JtdsResultSet.first(JtdsResultSet.java:527)
          at com.verint.impact360.WFM_plugins.CCE.CCEASCMAdapter.runReport(CCEASCMAdapter.java:238)
          at com.verint.impact360.WFM_plugins.CCE.CCEASCMAdapter.retrieveData(CCEASCMAdapter.java:131)
          at com.bluepumpkin.Plugins.PTeXtender.GenericDCSPlugin.retrieveStatisticsData(GenericDCSPlugin.java:332)
          at com.bluepumpkin.Plugins.PTeXtender.GenericDCSPlugin.start(GenericDCSPlugin.java:68)
          at com.verint.impact360.WFM_plugins.CCE.CCEASCMAdapter.main(CCEASCMAdapter.java:75)
  Logger.logStackTrace():----- End Stack Trace   ------
  </code></pre>
  
  <p>Is it related to SQL Server 2008?
  I am not sure ,but I didn't have this error when connectig to SQL Server 2005.</p>
  
  <p>Thanks</p>