private void editEmpHistActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editEmpHistActionPerformed
        String pos = position.getText();
        String empl = employer.getText();
        String strt = start.getText();
        String nd = end.getText();
        
        if(!"".equals(pos) || !"".equals(empl)){
            String sql = "update EmploymentHistory set jobTitle=?,employer=?,start=?,end=? where empNo=? and jobTitle=? and employer=? and start=? and end=?";            
            try{
                conn = DBConnect.connect();
                pst = conn.prepareStatement(sql);
                pst.setString(1, pos);
                pst.setString(2, empl);
                pst.setString(3, strt);
                pst.setString(4, nd);
                pst.setString(5, empNm);
                pst.setString(6, job);
                pst.setString(7, emplyr);
                pst.setString(8, st);
                pst.setString(9, en);
                pst.execute();
                
                JOptionPane.showMessageDialog(null, "Command successful!");
                position.setText("");
                employer.setText("");
                start.setText("");
                end.setText("");
                position.requestFocus(true);
            }
            catch(Exception e){
                JOptionPane.showMessageDialog(null, e);
            }
            finally{
                if(pst != null){
                     try{
                         pst.close();
                    }
                    catch(SQLException e){

                    }
                }
                if(conn != null){
                     try{
                         conn.close();
                    }
                    catch(SQLException e){

                    }
                }
            }
            initEmpHistTable();
        }
        else{
            JOptionPane.showMessageDialog(null, "Command unsuccessful!\nPosition and Employer input fields are empty");
        }
    }