listview adoquery
问题是: listview如何动态显示从数据库中搜索出的相关字段值
[解决办法]
TListItem * item ;AnsiString ls_Select = "select * from TableName";ADOQuery1->Close();ADOQuery1->SQL->Clear();ADOQuery1->SQL->Add(ls_Select) ;DOQuery1->Open();while(!ADOQuery1->Eof){ item = ListView1->Items->Add(); item->Caption = ADOQuery1->FieldByName("DateName")->AsString; item->SubItems->Add(ADOQuery1->FieldByName("Text1")->AsString) ; item->SubItems->Add(ADOQuery1->FieldByName("Text1")->AsString) ; ADOQuery1->Next();}