salut, j'ai un problème à l'insertion un champs date dans ma base de donnée et je ne c'est pas comment je dois faire aide-moi please
public void insererUneIntervention(int numint, Date dateint , String protocole) throws SQLException {
PreparedStatement pstmt = null;
try {
pstmt = connection.prepareStatement("INSERT INTO materiel (numint,dateint,protocole ) VALUES (?, ? , ? )");
pstmt.clearParameters();
pstmt.setInt(1, numint);
pstmt.setDate(2, dateint);
pstmt.setString(3, protocole);
pstmt.executeUpdate();
pstmt.close();
} finally {
if (pstmt != null) {
pstmt.close();
}
}
}