How do I save only one of the fields of this select
?
Statement stmt = con.createStatement();
ResultSet RS = null;
RS = stmt.executeQuery("select codplpag, descricao from pcplpag ORDER BY 1,2");
while(RS.next()){
// ListaBox.addItem(RS.getString("codplpag")+" / " + RS.getString("descricao"));
ListaBox.addItem(RS.getString("codplpag" )+" / " + RS.getString("descricao"));
}
Update:
int registro = stmt.executeUpdate("update pcpedc set codplpag =" +ListaBox.getSelectedItem().toString()+
"where numped=" + consPCPEDC);