public boolean insertSkillInfo(String personnelID, Skill sk) { boolean check = true; PreparedStatement ps; if (dbc.connect()) { try { String sqlQuery = "INSERT INTO " + SKILL_INFO + " VALUES(?,?,?,?,?)"; ps = dbc.getConnection().prepareStatement(sqlQuery); ps.setString(1, personnelID); ps.setShort(2, sk.getNameID()); ps.setShort(3, sk.getClassificationID()); ps.setNString(4, sk.getNote()); if (sk.getEffectiveDate() == null) { ps.setNull(5, java.sql.Types.DATE); } else { ps.setDate(5, sk.getEffectiveDate()); } if (ps.executeUpdate() < 1) { check = false; } } catch (SQLException ex) { Logger.getLogger(PersonnelDAO.class.getName()).log(Level.SEVERE, null, ex); } } return check; }