I have a simple question but i don't get that figured out
I have a ZQuery and i open it. Now not to run into trouble I need to check if that query has an empty result (if so the code that uses the result must not be run).
How do I do that?
ZQuery.EmptyDataSet, ZQuery.FieldCount and ZQuery.RecordCound were tried without success so far.
Unfortunately I don't find documentation so far so maybe that could be due to wrong logic .
who can help me?
Sebastian
How to determine if a Query has an empty result
Moderators: gto, cipto_kh, EgonHugeist
Try like this:
Code: Select all
if ZQuery1.IsEmpty then
// ...
it turned out to be somewhat xcrossport bug in lazarus.
I used ZQuery.RecordCount <> 0 on linux and it works fine. After publishing that project und moving it to my windows box und compiling it with windows lazarus (same version) it works fine there too.
So I say its not a ZeosLib issue...
cheers
Sebastian
I used ZQuery.RecordCount <> 0 on linux and it works fine. After publishing that project und moving it to my windows box und compiling it with windows lazarus (same version) it works fine there too.
So I say its not a ZeosLib issue...
cheers
Sebastian