title: java.sql.SQLException: Invalid cursor state - no current row
body: <p>I keep getting this error when I use the getString method from the ResultSet. I use the returned ResultSet of the first method for the second method. Relevant Code:</p>
  
  <pre><code>public ResultSet getStudentRS(){
      try{
          studentRS = s.executeQuery("SELECT * FROM Students "
                  + "WHERE StudentID=210569906");
      }
      catch(SQLException error){
          System.err.println("Unable to query for getStudentRS.");
          error.printStackTrace(System.err);
          System.exit(0);
      }
      return studentRS;
  }
  
  public String getUserName(){
      try{
          while(rs.next())
              return rs.getString(1) + " " + rs.getString(2); // Exception Here
      }
      catch(SQLException error){
          System.err.println("Unable to query for getUserName.");
          error.printStackTrace(System.err);
          System.exit(0);
      }
      return "Failure";
  }
  </code></pre>
  
  <p>Any help is greatly appreciated in resolving this issue.</p>