title: Update table "visita" if this have values of other tables
body: <p>I put this code in a button, i have table &quot;visita&quot; whit foreign keys of tables &quot;empleado&quot;, &quot;departamento&quot;, &quot;asunto&quot;, &quot;tipo&quot;</p>
  <pre><code>String n= txtcodigo.getText();
  try{
      conexion cc=new conexion();
      Connection cn=cc.Conexion();
      int row = jTable1.getSelectedRow();
      String value =(jTable1.getModel().getValueAt(row, 0).toString());
  </code></pre>
  <p><strong>This part i dont know if is correct</strong> because is very large and i dont know how update foreign keys</p>
  <pre><code>String query =&quot;UPDATE visita SET 
                      nombre=?, apellido_p=?, apellido_m =?, 
                      compania=?, dia=?, horae=?, recepcionista=? 
                      Empleado_idEmpleado=?, Empleado_Departamento_idDepartamento=?, 
                      asunto_idasunto=?, cliente_idcliente=?, 
                      observaciones=? 
                  where idVisita=&quot;+value;
          
  </code></pre>
  <p>and i have a table on netbeans, if i want change one value, only click the row</p>