Lena Posted October 23, 2015 Share Posted October 23, 2015 Hi. I meet with components for mobile development. I can’t get all the records upon SQL request (FireDAC). 1. UnimDBList Set DataSource Set DataField Open SQL but UnimDBList empty. 2. UnimDBSelect Set DataSource Set DataField Open SQL but I see only one record. How get all records? Thanks. //my code after close login form: void __fastcall TMainmForm::UnimFormBeforeShow(TObject *Sender) { UniMainModule()->FDQueryOrgan->Active = false; UniMainModule()->ClientDataSetOrgan->Active = false; UniMainModule()->FDQueryOrgan->Active = true; UniMainModule()->FDQueryOrgan->FetchAll(); UniMainModule()->FDQueryOrgan->First(); UniMainModule()->ClientDataSetOrgan->Active = true; ShowMessage(IntToStr(UniMainModule()->ClientDataSetOrgan->RecordCount));//<- 2 records } Link to comment Share on other sites More sharing options...
Lena Posted October 23, 2015 Author Share Posted October 23, 2015 I got all records in UnimDBSelect if I add two lines of ugly code: void __fastcall TMainmForm::UnimFormBeforeShow(TObject *Sender) { UniMainModule()->FDQueryOrgan->Active = false; UniMainModule()->ClientDataSetOrgan->Active = false; UniMainModule()->FDQueryOrgan->Active = true; UniMainModule()->FDQueryOrgan->FetchAll(); UniMainModule()->FDQueryOrgan->First(); UniMainModule()->ClientDataSetOrgan->Active = true; UniMainModule()->ClientDataSetOrgan->Last();//add UniMainModule()->ClientDataSetOrgan->First();//add ShowMessage(IntToStr(UniMainModule()->ClientDataSetOrgan->RecordCount)); } Link to comment Share on other sites More sharing options...
Recommended Posts