儿
儿
Unregistered / Unconfirmed
GUEST, unregistred user!
我从别人那拿了一段代码,不过一运行,错误很多。
保存(用循环的方法写到文本文件中)
procedure SaveData(qrData:TQuery;strFile:String);
var
f:TextFile;
cc:Integer;
//Column Counter
begin
Assign(f,strFile);
Rewrite(f);
with qrDatado
begin
DisableControls;
First;
while not Eofdo
begin
For cc:=0 to FieldCount-1do
Write(f,Fields.AsString);
Next;
end;
First;
EnableControls;
end;
Close(f);
end;
保存(用循环的方法写到文本文件中)
procedure SaveData(qrData:TQuery;strFile:String);
var
f:TextFile;
cc:Integer;
//Column Counter
begin
Assign(f,strFile);
Rewrite(f);
with qrDatado
begin
DisableControls;
First;
while not Eofdo
begin
For cc:=0 to FieldCount-1do
Write(f,Fields.AsString);
Next;
end;
First;
EnableControls;
end;
Close(f);
end;