title: Total Number of Row Resultset getRow Method
body: <p>Read the Following Code:</p>
  
  <pre><code>public class selectTable {
  
  public static ResultSet rSet;
  public static int total=0;
  public static ResultSet onLoad_Opetations(Connection Conn, int rownum,String sql)
  {
  int rowNum=rownum;
  int totalrec=0;
  try
  {
     Conn=ConnectionODBC.getConnection();
     Statement stmt = Conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);        
      String sqlStmt = sql;        
      rSet = stmt.executeQuery(sqlStmt);
      total = rSet.getRow();        
      }
      catch(Exception e)
      {
          System.out.println(e.getMessage());
      }
      System.out.println("Total Number of Records="+totalrec);
      return rSet;
      }
  
  }
  </code></pre>
  
  <p>The folowing code dos't show actual total:</p>
  
  <pre><code>total = rSet.getRow();
  </code></pre>
  
  <p>my jTable display 4 record in jTable but total = 0; when I evaluate through debug, it shows:</p>
  
  <pre><code>total=(int)0; 
  </code></pre>
  
  <p>rather than total=(int)4
  And if I use </p>
  
  <pre><code>rSet=last(); above from the code  total = rSet.getRow();
  </code></pre>
  
  <p>then total shows accurate value = 4 but rSet return nothing. then jTable is empty.
  Update me!</p>