with lsvData.Items.Add do begin Caption := ID字段的值; SubItems.Add(login字段的值); lsvData.Items.Item[j - 1].ImageIndex := 1;//添加图标 Inc(j); end;
可以清楚一点吗? if ComboBox1.itemIndex =0 then ADOQuery1.SQL.Text:='select * from hub_netsun.minfo where login ='''+Edit1.text+'''' else ADOQuery1.SQL.Text:='select * from hub_netsun.minfo where id ='''+Edit1.text+''''; ADOQuery1.Open; 如我这样查询出来的结果要用来listview控件与表格方式显示出来。我写了老是错误。
with lsvData.Items.Add do
begin
Caption := ID字段的值;
SubItems.Add(login字段的值);
lsvData.Items.Item[j - 1].ImageIndex := 1;//添加图标
Inc(j);
end;
if ComboBox1.itemIndex =0 then
ADOQuery1.SQL.Text:='select * from hub_netsun.minfo where login ='''+Edit1.text+''''
else
ADOQuery1.SQL.Text:='select * from hub_netsun.minfo where id ='''+Edit1.text+''''; ADOQuery1.Open;
如我这样查询出来的结果要用来listview控件与表格方式显示出来。我写了老是错误。