SHARE
TWEET

Untitled

a guest Jun 18th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.         String sql = "INSERT INTO pacientes(cod, bairro, paciente, telefone, RG) VALUES(?,?,?,?,?)";
  3.         try {
  4.  
  5.             PreparedStatement stmt = connection.prepareStatement(sql);
  6.             stmt.setString(1, pac.getCod());        
  7.             stmt.setString(2, pac.getBairro());
  8.             stmt.setString(3, pac.getPaciente());
  9.             stmt.setString(4, pac.getTelefone());
  10.             stmt.setString(5, pac.getRG());
  11.             stmt.execute();
  12.             stmt.close();
  13.         } catch (SQLException u) {
  14.             throw new RuntimeException(u);
  15.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top