delphi中的LISTVIEW怎么与数据库连接

时间:2021-01-08 10:39:50   收藏:0   阅读:0
listview1.clear;
with adoquery1 do
begin
  Sql.text := Select * from table1;
  Open ;

  while not eof do
  begin
    with listview1.items.add do
    begin
      caption := fieldbyName(field1).asstring;
      subitems.add(fieldbyName(field2).asstring);
      subitems.add(fieldbyName(field3).asstring);
      subitems.add...
    end;
    Next;
  end;
end;

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!