Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Class.forName("com.mysql.jdbc.Driver");
- conectar = (Connection) DriverManager.getConnection("jdbc:mysql://127.0.0.1/proyecto", "root", "");
- pst.setString(1, jTextField1.getText());
- pst.setString(2, jTextField2.getText());
- pst.setString(3, jTextField3.getText());
- pst.setString(4, jTextField4.getText());
- pst.setString(5, jTextField5.getText());
- pst.setString(6, jTextField6.getText());
- pst.setString(7, jTextField8.getText());
- FileInputStream ArchivosFoto;
- FileInputStream Archivofoto = new FileInputStream(jTextField7.getText());
- pst.setBinaryStream(8, Archivofoto);
- pst.setString(9, jTextField7.getText());
- int n = pst.executeUpdate();
- if (n > 0) {
- JOptionPane.showMessageDialog(null, "Se modificaron los datos de manera correcta :D");
- tablaDatos();
- } else {
- JOptionPane.showMessageDialog(null, "Ocurrio un error, no se pudo modificar los datos :c");
- }
Add Comment
Please, Sign In to add comment