[Q] how to find out if IZResultSet is empty

The BETA tester's 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
DPStano
Fresh Boarder
Fresh Boarder
Posts: 17
Joined: 16.05.2016, 09:21

[Q] how to find out if IZResultSet is empty

Postby DPStano » 26.07.2017, 13:49

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
Gold Boarder
Gold Boarder
Posts: 589
Joined: 17.01.2011, 14:17

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

Postby marsupilami » 03.08.2017, 09:41

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;


Return to “ZeosLib 7.2 Betatest Forum”

Who is online

Users browsing this forum: No registered users and 1 guest