我用的是delphi做的文件操作,,但是怎么做都只能记录一条信息,后面输入的覆盖掉了前面的,哪个高手指导一下,,怎么写才能记录多条信息。谢谢·

解决方案 »

  1.   

    var  f: TextFile;
    begin
      if OpenDialog1.Execute then
      begin                    { open a text file }
        AssignFile(f, OpenDialog1.FileName);
        Append(f);
        Writeln(f, 'I am appending some stuff to the end of the file.'); 
        { insert code here that would require a Flush before closing the file }
        Flush(f);  { ensures that the text was actually written to file }
        CloseFile(f);
      end;end;
      

  2.   

    var  f: TextFile;
    begin
      if OpenDialog1.Execute then
      begin                    
        AssignFile(f, OpenDialog1.FileName);//打开文件 
        Append(f);//切换到添加方式
        Writeln(f, 'I am appending some stuff to the end of the file.');   // 写一行
        Flush(f);  { 确保写入的数据生效}
        CloseFile(f);//关闭文件
      end;end;这是DELPHI帮助上的,建议你可以多看一点帮助,看多了英语不会难的