[Q] how to find out if IZResultSet is empty

The forum for ZeosLib 7.2 Report problems. Ask for help, post proposals for the new version and Zeoslib 7.2 features here. This is a forum that will be edited once the 7.2.x version goes into RC/stable!!

My personal intention for 7.2 is to speed up the internals as optimal a possible for all IDE's. Hope you can help?! Have fun with testing 7.2
Post Reply
DPStano
Junior Boarder
Junior Boarder
Posts: 39
Joined: 16.05.2016, 09:21

[Q] how to find out if IZResultSet is empty

Post by DPStano »

i'm really sorry but cant find proper forum to post that question, is there any way how to find out if IZResultSet is empty without trying to itterate it?
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: [Q] how to find out if IZResultSet is empty

Post by marsupilami »

Hello DPStano, I seem to remember that there are member functions which tell you if you are before the first or after the last record? The following procedures should do the trick:

Code: Select all

  {** Rows returned by SQL query. }
  IZResultSet = interface(IZInterface)
    [...]
    function IsBeforeFirst: Boolean;
    function IsAfterLast: Boolean;
    function IsFirst: Boolean;
    function IsLast: Boolean;
Post Reply