type
  channelrecord=record
     Flow:integer;
     tempstr:string;
  end;               // 定义记录  private
    channel:array [0..10] of channelrecord;
end;procedure Tmain.Dowork(chnl: integer);
begin
  case channel[chnl].flow of
  0: begin
       With ADOQuery1 Do
       Begin
         Close;
         Sql.Clear;
         SQL.Add('Select top 1 * From T_Client where F_phone='''+inttostr(channelno)+''' ');
       End;
       TQryThread.Create(False,ADOQuery1,channelno);  //想在这加入多线程,每个channel去查询数据库
     end;
  1: begin
       //显示出查询的结果
     end;end;procedure Tmain.Timer1Timer(Sender: TObject);   //定时器
begin
  for i :=0 to 10 do
  begin
    Dowork(i);
  end;
end;上面是代码片段,想法就是在循环中加入多线程查询,因为channel是动态的,如果channel是10是不是要建10个线程?希望大家结点思路,感激不尽