title: Invalid operation at current cursor position
body: <p>I made a Java Forum and im trying to search my sql table, when i click the button to finally search it (the name of the person) it comes up with a "Invalid Operation at Current Cursor Position" error. </p>
  
  <p>Here'e my code for the search button. Please help me figure this out.</p>
  
  <hr>
  
  <pre><code>private void firstSearchActionPerformed(java.awt.event.ActionEvent evt) {                                            
      try{
          String fname = searchText.getText();
          Connection connect = DriverManager.getConnection("jdbc:derby://localhost:1527/Employees",
              "users", "admin");
          PreparedStatement pState = connect.prepareStatement("select * from WORKERS where First_Name = ?");
          pState.setString(1,fname);
          ResultSet rSet;
          rSet = pState.executeQuery();
          if(rs.next()){
              int id_col = rSet.getInt("Employee_ID");
              String id = Integer.toString(id_col);
              String first = rSet.getString("First_Name");
              String last = rSet.getString("Last_Name");
              String job = rSet.getString("Title");
              String hireDate = rSet.getString("Hire_Date");
              textID.setText(id);
              textFirstName.setText(first);
              textLastName.setText(last);
              textTitle.setText(job);
              textHireDate.setText(hireDate);
          }else{
              JOptionPane.showMessageDialog(null, "Not in Database");
          }
      }catch(SQLException err){
          JOptionPane.showConfirmDialog(employees.this, err.getMessage());
      }
  </code></pre>
  
  <p>}</p>