var
I:integer;
lbl:Tlabel;
beginwith adoquery1 do
begin
sql.add('select * from tablename');
execsql;
Recordset.MoveFirst;
for i :=0 to RecordCount-1 do
begin
lbl:=Tlabel.Create(self);
lbl.Name :='lbl'+inttostr(i);
lbl.Parent:=self;
lbl.Caption:=adoquery1.FieldByName('fieldname').AsString;
lbl.Top:=100;
lbl.Left:=i*10+50;
recordset.MoveNext;
end;
end;
end;
I:integer;
lbl:Tlabel;
beginwith adoquery1 do
begin
sql.add('select * from tablename');
execsql;
Recordset.MoveFirst;
for i :=0 to RecordCount-1 do
begin
lbl:=Tlabel.Create(self);
lbl.Name :='lbl'+inttostr(i);
lbl.Parent:=self;
lbl.Caption:=adoquery1.FieldByName('fieldname').AsString;
lbl.Top:=100;
lbl.Left:=i*10+50;
recordset.MoveNext;
end;
end;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货