2,496
社区成员
发帖
与我相关
我的任务
分享
procedure TForm1.btn1Click(Sender: TObject);
var
F:textfile;
r:string;
path:string;
begin
r:=adoquery1.fieldbyname('sum').asstring;
path:=extractfilepath(application.exename)+'test.txt';
AssignFile(F,path);
if FileExists(path) then
begin
ReSet(F);
Append(F);
end
else
begin
ReWrite(F);
end;
writeln(f,r);
closefile(f);
end;