W
wsd
Unregistered / Unconfirmed
GUEST, unregistred user!
下面有一个例子,用来测试tquery的速度:
procedure TForm1.Button1Click(Sender: TObject);
var s:string;i:integer;
begin
s:=edit1.text;
for i:=0 to 1000 do
begin
with query1 do
begin
close;sql.clear;
sql.add(format('select %s from "%s "',[s,'d:/employee.db']));
open;
end;
end;
发现速度奇慢无比,请问有什麽好的方法能加快动态sql语句的速度?
另外我记得用prepare可以,增麽用?
procedure TForm1.Button1Click(Sender: TObject);
var s:string;i:integer;
begin
s:=edit1.text;
for i:=0 to 1000 do
begin
with query1 do
begin
close;sql.clear;
sql.add(format('select %s from "%s "',[s,'d:/employee.db']));
open;
end;
end;
发现速度奇慢无比,请问有什麽好的方法能加快动态sql语句的速度?
另外我记得用prepare可以,增麽用?