LexarG56

Generation

generate functionWed, 19 Jul 2023

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

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: String cod=txtcod.getText(); try { cts=cn.prepareCall("{call eliminarcliente(?)}"); cts.setString(1, cod); int rpta=cts.executeUpdate(); if(rpta==1){ JOptionPane.showMessageDialog(this,"Cliente Eliminado correctamente!!","Aviso",JOptionPane.INFORMATION_MESSAGE); BOTONES(); DESABILITAR(); limpiar(); cargar(); }else { JOptionPane.showMessageDialog(this, "Cliente no Eliminado", "Aviso", JOptionPane.INFORMATION_MESSAGE); } } catch (SQLException | HeadlessException e) {JOptionPane.showMessageDialog(this, e.toString

Questions about programming?Chat with your personal AI assistant