List

Giganews Newsgroups
Subject: List
Posted by:  Adriano (adrbru…@yahoo.com.br)
Date: Thu, 5 Apr 2007

Hello... I need some help please!

I'm using TidFTP version 10.1.5 with BDS 2006.

After I connect to the server I received a message "Cannot open data
connection". Is there some reason ? I'm still using the unit
IdAllFTPListParsers.

In my simple application after some minutes connected I get the message "
Cannot open data connection" but when I try using other FTP software it's
working fine.

The code:
  if FTP.Connected then
    FTP.Disconnect
  else
    begin
      lbStatus.Items.Clear;
      FTP.Connect;
    end;

  if ftp.Connected then
    begin
      lbStatus.Items.Add( 'Connected' );

      lbDirectory.Items.Clear;
      FTP.ChangeDir('/ATUALIZA');
      FTP.List(lbDirectory.Items, '', false);
    end
  else
    lbStatus.Items.Add( 'Desconected' );

Thanks

Adriano

Replies