Code: Select all
RequestHardwares.Close;
if not MainWND.TB_Apply_Filter.Down then
RequestHardwares.SQL.Strings[RequestHardwares.SQL.Count-1]:='where hardwares."HW_Location"='
+{CabinetsTable}RO_Cabinets.Fields[0].AsString+';'
else begin
// MainWND.DoFilterActionClick(nil);
exit;
end;
RequestHardwares.Open;
{Here i gon an error: cannot perform... to inactive dataset
i must prevent to entering displaying data procedure when no data was returned}
if RequestHardwares.RecordCount=0 then exit;
FillList;
i got error when trying to check RecordCount property. Whats wrong in my code? Or this is normal? Please answer me.
P.S. same code in delphi cause NO error when dataset is empty (reccount returns zero)
Thanks.