Estou tentando salvar uma unica coluna cm base em outras 3, mas não estou conseguindo. quando eu tiro todas as outras e deixo apenas a RCPERFIL da certo, mas quando eu coloco as outras colunas, não da certo.
for (int i = 0; i < jTable1.getRowCount(); i++) {Class.forName(Auxiliar.AcessoBanco.getDriver()); Connection con = DriverManager.getConnection(Auxiliar.AcessoBanco.getUrl(), Auxiliar.AcessoBanco.getUser(), Auxiliar.AcessoBanco.getPass()); String sql = "update Resultado set DISPOSICAO=? WHERE N_ETIQUETA=? and DATA=? and HORA=? and RCPERFIL=?"; PreparedStatement pst = con.prepareStatement(sql); String DISPOSICAO = (jTable1.getValueAt(i, 22).toString());//2 String N_ETIQUETA = (jTable1.getValueAt(i, 4).toString());//2 String DATA = (jTable1.getValueAt(i, 0).toString());//2 String HORA = (jTable1.getValueAt(i, 1).toString());//2 String RCPERFIL = (jTable1.getValueAt(i, 2).toString());//2 pst.setString(1, DISPOSICAO);//2 pst.setString(2, N_ETIQUETA);//2 pst.setString(3, DATA);//2 pst.setString(4, HORA);//2 pst.setString(5, RCPERFIL);//2 pst.executeUpdate();