LexarG56

Generation

generate functionWed, 19 Jul 2023

En el actionperformed haga que un boton pueda eliminar un dato registrado tipo codigo de una base de datos

private void jEliminarActionPerformed(java.awt.event.ActionEvent evt) { try { PreparedStatement pps = conexion.prepareStatement("delete from articulos where codigo_articulo='"+txtCodigo.getText()+"'"); pps.executeUpdate(); JOptionPane.showMessageDialog(null, "Dato eliminado"); } catch (SQLException ex) { Logger.getLogger(GestionarArticulos.class.getName()).log(Level.SEVERE, null, ex); } }

Questions about programming?Chat with your personal AI assistant