一下是timer中的代码
procedure TForm1.tmr1Timer(Sender: TObject);
var
  i,j:Integer;begin  for i:=2 to 11 do
  begin
    TLabel(FindComponent('lbl'+inttostr(i))).caption := '';
  end;
  if qry1.Eof then qry1.First;
  i:=2;
  while (not qry1.Eof) and (i<12) do  begin
     TLabel(FindComponent('lbl'+inttostr(i))).caption :=  qry1.Fields[0].AsString;
     i:=i+1;
     qry1.Next;
  end;  for j:=12 to 21 do
  begin
    TLabel(FindComponent('lbl'+inttostr(j))).Caption:='';
  end;
  if qry2.Eof then qry2.First;
  j:=12;
  while (not qry2.Eof) and (j<22) do  begin
    TLabel(FindComponent('lbl'+inttostr(j))).Caption:='¥'+qry2.Fields[0].AsString;
    j:=j+1;
    qry2.Next;
  end;
数据库数据delphilabel