不明白,有没有人知道?
with DataModule1.Q do
begin
sql.Clear;
SQL.Add('select * from "temp.db"');
while not eof do
begin
with listview1.Items.Add do
begin
caption:=FieldByName('编码').AsString ;
subitems.add(FieldByName('菜名').AsString);
subitems.add(FieldByName('单位').AsString);
subitems.add(FieldByName('单价').AsString);
end;
next;
end;
open;
end;
这样写可是listview没有东东