救命啊!!!

解决方案 »

  1.   

    出现的错误提示是:project project1.exe raised exception class EAcessViolation with message 'Acess violation at address 004042E6 in moudle 'project1.exe'. Read of address 0069006C'. process stopped. Use Step or Run to continu.很头疼的错误啊!!
      

  2.   

    procedure TForm1.Button1Click(Sender: TObject);
    begin
        Ftp.Vendor := 1;
        Ftp.Host := '.....';
        Ftp.UserID := '...';
        Ftp.Password := '...';
        Ftp.Connect;    Ftp.ChangeDir('\database');
        Ftp.NList;
        Ftp.Mode(MODE_ASCII);
    end;procedure TForm1.FTPListItem(Listing: String);
    begin
      Ftp.DownLoad(Listing, Listing);
    end;
      

  3.   

    这样试试,如果不行,呵呵,可以接着哭 ^_^procedure TForm1.Button1Click(Sender: TObject);
    begin
        if NMFTP1.Connected then
        begin
           Memo1.Clear;
           NMFTP1.Nlist;
        end;
    end;procedure TForm1.NMFTP1ListItem(Listing: String);
    begin
       memo1.Lines.Append(Listing);
       if memo1.Lines.Count>0 then
       begin
          try
             NMFTP1.Download(Memo1.Lines[0],'c:\'+Memo1.Lines[0]);
             Memo1.Lines.Delete(0);
          Except
          end;
       end;
    end;
      

  4.   

    不会吧,我就这么做的呀,没有问题哦 
    下面的差不多就是我的源码,只不过我省去了一些判断语句和相关处理而已,与功能没有关系procedure TForm1.Button1Click(Sender: TObject);
    var i:integer;
    begin
        if NMFTP1.Connected then
        begin
           Memo1.Clear;
           NMFTP1.Nlist;
           if memo1.Lines.Count>0 then
           for i:=0 to memo1.lines.count-1 do
           begin
              try
                 NMFTP1.Download(Memo1.Lines[i],'c:\'+Memo1.Lines[i]);
                 
              Except
              end;
           end;  
        end;
    end;procedure TForm1.NMFTP1ListItem(Listing: String);
    begin
       memo1.Lines.Append(Listing);
       
    end;
      

  5.   

    关键是我在 ListItem里写了:  NMFtp.DownLoad(Listing, Listing)每次到这就出错,但是第一次不会出错
      

  6.   

    强烈建议不要用FASTNET中的控件,我手头也有个一样的程序版本控制程序,首先也采用了NMFTP,它很多的BUG,建议采用INDY中的IDFTP控件,稳定很多!!!!!!!!!,强烈建议,DELPHI都不用FASTNET啦
      

  7.   


    将listing 保存到字符串列表中,然后遍历下载!!!
      

  8.   

    to: warton(相信CPP,相关Borland) 这个办法可行
      

  9.   

    不要在OnListItem中download,没有问题的
      

  10.   

    同意 warton(相信CPP,相关Borland);simni(simni)
      

  11.   

    Applies to
    TNMFTP componentDeclaration
    property OnListItem: TNMListItem;Description
    The OnListItem event is called when a directory listing is taking place. This event is called once for each item that gets listed.Event Parameters:
    The Listing parameter is the item being currently listed.Notes:
    This event gets called by the List and NList methods.
      

  12.   

    我是初学,有人说NMFTP是第3方控件,性能不稳定,真的???