[java] atualizarDate

Viewer

copydownloadembedprintName: atualizarDate
  1. public Boolean atualizarDate(String nomeTabela, String nomeColuna, LocalDate valorColuna, String colunaRef, int valorRef) {
  2.                 String query = "UPDATE " + schema + nomeTabela + " " + "SET " + nomeColuna + " = "
  3.                                 + DataParser.localDateToSQLQuery(valorColuna) + " WHERE " + colunaRef + "=" + valorRef;
  4.                 PreparedStatement ps;
  5.                 try {
  6.                         ps.executeUpdate();
  7.                         return true;
  8.                 } catch (SQLException e) {
  9.                         e.printStackTrace();
  10.                 }
  11.                 return false;
  12.         }

Editor

You can edit this paste and save as new:


File Description
  • atualizarDate
  • Paste Code
  • 05 May-2021
  • 458 Bytes
You can Share it: