先加一个table控件
table1.databasename:='\data';
table1.tablename:=youtablename;

解决方案 »

  1.   

    Var F: TextFile;AssignFile(FileName, F);
    Reset(F);
    ReadLn(S,F);  读一行
    WriteLn(S,F); 写一行
    Close(F);
      

  2.   

    var   F: TextFile;
      S: string;
    begin
      if OpenDialog1.Execute then            { Display Open dialog box }
      begin
        AssignFile(F, OpenDialog1.FileName); { File selected in dialog }
        Reset(F);
        Readln(F, S);                        { Read first line of file }
        Edit1.Text := S;                     { Put string in a TEdit control }
        CloseFile(F);
      end;
    end;
    { This example assumes you are compiling as a console application }var   s : string;
     begin
       Write('Enter a line of text: ');
       Readln(s);
       Writeln('You typed: ',s);
       Writeln('Hit <Enter> to exit');
       Readln; end;