是这样的:
我要把在DBGrid中显示的数据全部送到写字板中?该如何做?

解决方案 »

  1.   

    操作DATASET,用filedcount,filedname,filebyname,双重循环取值,一条一条写进MEMO,再用MEMO 的SAVE AS 方法存就可以了
      

  2.   

    var
      F:TextFile;
    begin
    ....
    AssignFile(F,'.\test.txt');
    ReWrite(F);
    AdoTable1.First;
    while not AdoTable1.Eof do
    begin
      AStr:=AdoTable1.FieldByName('Field1').AsString;
      AInt:=AdoTable1.FieldByName('Field2').AsInteger;
      ALine:=AStr+'  '+IntToStr(AInt);
      WriteLn(F,ALine);
      AdoTable1.Next;
    end;
    CloseFile(F);
    AdoTable1.Close;
    end;
      

  3.   

    补充,最后用winexec将文件用写字板打开就行了