Bonjour,
J'ai un probleme dans une de mes fonctions dont voici le code :
Lors de mes deux setDate, j'ai l'erreur suivante :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 public void editProject(ProjectDO project) throws SQLException { String sql = "UPDATE PROJECT SET IDPROJECT=?,NAME=?,IDPM=?,STARTDATE=?,ENDDATE=? WHERE IDPROJECT="+project.getIdProject(); PreparedStatement ps = m_connection.prepareStatement(sql); ps.setLong(1, project.getIdProject()); ps.setString(2, project.getName()); ps.setLong(3, project.getIdPm()); ps.setDate(4, project.getStartDate()); ps.setDate(5, project.getEndDate()); ps.executeUpdate(); }
The method setDate(int, Date) in the type PreparedStatement is not applicable for the arguments
(int, Date)
Je ne vois vraiment pas d'ou ca peut venir, si quelqu'un pouvait m'aider ca serait super cool !
Partager