[java] atualizarDate
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
- public Boolean atualizarDate(String nomeTabela, String nomeColuna, LocalDate valorColuna, String colunaRef, int valorRef) {
- String query = "UPDATE " + schema + nomeTabela + " " + "SET " + nomeColuna + " = "
- + DataParser.localDateToSQLQuery(valorColuna) + " WHERE " + colunaRef + "=" + valorRef;
- PreparedStatement ps;
- try {
- ps.executeUpdate();
- return true;
- } catch (SQLException e) {
- e.printStackTrace();
- }
- return false;
- }
Editor
You can edit this paste and save as new: