Problems using ZQuery
Posted: 13.11.2013, 09:10
Hi all/ I have Lazarus 1.2RC1 and ZeosDBO 7.1.2 stable
My code generates a SELECT SQL statement. But when generated query returns an empty dataset,
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.
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.