小编Kam*_*igi的帖子

将数百万条记录加载到字符串列表中可能会非常慢

我如何能够非常快速地将数百万条记录从tadotable加载到stringlist中?

procedure TForm1.SlowLoadingIntoStringList(StringList: TStringList);
begin
  StringList.Clear;
  with SourceTable do
  begin
    Open;
    DisableControls;
    try
      while not EOF do
    begin
      StringList.Add(FieldByName('OriginalData').AsString);
      Next;
    end;
   finally
   EnableControls;
   Close;
  end;
end;
Run Code Online (Sandbox Code Playgroud)

delphi tstringlist tadotable

5
推荐指数
2
解决办法
3175
查看次数

标签 统计

delphi ×1

tadotable ×1

tstringlist ×1