title: Getting an error "before start of result set" from mysql java
body: <p>Hi I get an error message in the following code:</p>
  <pre><code>public Component createComponents(){
      Panel pane = new Panel();
      try{
          Connection myConn = DriverManager.getConnection(&quot;jdbc:mysql://localhost:3306/tondb?useSSL=false&amp;useUnicode=true&amp;useJDBCCompliantTimezoneShift=true&amp;useLegacyDatetimeCode=false&amp;serverTimezone=UTC&quot;,&quot;root&quot;,&quot;&quot;);
          Statement myStmt = myConn.createStatement();
          ResultSet myRs = myStmt.executeQuery(&quot;select * from activeemployees&quot;);
          ResultSet myRs2 = null;
          while (myRs.next()) {
              myRs2 = myStmt.executeQuery(&quot;SELECT * FROM employee WHERE ID=&quot;+myRs.getString(&quot;IDnumber&quot;));
              pane.add(new Label(myRs2.getString(&quot;firstName&quot;)+&quot;,&quot;+myRs.getString(&quot;lastName&quot;),20,20));
          }
      }catch(Exception e){
          JOptionPane.showMessageDialog(null, e.getMessage());
      }
      return pane;
  }
  </code></pre>
  <p>Here's the image attached:</p>
  <p><img src="https://i.stack.imgur.com/lrb5P.jpg" alt="enter image description here" /></p>
  <p>Can not figure out why.</p>