1
With the help of this reply I was able to edit the data I enter in the database, but the old data that is already registered, when I try to change the registration, the program continues to close alone and when debugging displays the following error message.
And if I keep debugging the mistake it becomes:
I was debugging the code and the error is occurring in procedure Upload_ftp, mine procedure this way:
procedure TfrmCriarArquivo.Envio_ftp(grupo, cliente: string);
begin
  with FTP do try
    Username := frmMenu.usuario;
    Password := frmMenu.senha;
    Host := frmMenu.endereco;
    Port := StrtoInt(frmMenu.porta);
    Connect;
    try
      ChangeDir(grupo);
    except
      FTP.MakeDir(grupo);
      ChangeDir(grupo);
    end;
    try
      FTP.Put('dados.ini', 'dados.ini', false);
    except
    end;
    try
      ChangeDir(grupo + '/' + cliente);
    except
      FTP.MakeDir(grupo + '/' + cliente);
      ChangeDir(grupo + '/' + cliente);
    end;
  except
    application.Terminate;
  end;
  try
    FTP.Put(cliente + '.xml', cliente + '.xml', False);
    FTP.Put('Tags' + '_' + cliente + '.txt', 'Tags' + '_' + cliente + '.txt', false);
  finally
    FTP.Disconnect;
  end;
  DeleteFile(cliente + '.xml');
  DeleteFile('Tags' + '_' + cliente + '.txt');
  DeleteFile('dados.ini');
end; 
Remembering that this only happens when I try to change the old bank records.
New Error:
and how was the procedure after the change:
with FTP do try
    Username := frmMenu.usuario;
    Password := frmMenu.senha;
    Host := frmMenu.endereco;
    Port := StrtoInt(frmMenu.porta);
    Connect;
    try
      ChangeDir(grupo);
    except
      FTP.MakeDir(grupo);
      ChangeDir(grupo);
    end;
    try
      FTP.Put('dados.ini', 'dados.ini', false);
    except
    end;
    try
      ChangeDir(grupo + '/' + cliente);
    except
      FTP.MakeDir(grupo + '/' + cliente);
      ChangeDir(grupo + '/' + cliente);
    end;
  except
    application.Terminate;
  end;



Looking over the top, the only place that makes sense to meet this source is at
StrtoInt. Are you surefrmMenu.portais filled?– Genos
@Genos I’m a beginner in Delphi and this code is legacy, I will now debug the code again and when I step the mouse cursor over that line
frm.portashow me''– R.Santos