Sei sulla pagina 1di 1

try {

PreparedStatement pst =co.prepareStatement ("select *from clientes where Id_vendedor=?");


pst.setString(1, cla.getText());

ResultSet rs = pst.executeQuery();
if (rs.next()){
monto.setText(rs.getNString("Monto_compra"));
}else{
JOptionPane.showMessageDialog(null, "No existe una persna con al clave");
}
}catch(SQLException ex){
System.err.println(ex);
}

https://www.youtube.com/watch?v=4KXHlW_SckU&t=201s

Potrebbero piacerti anche