Page 1 of 1

[Q] how to find out if IZResultSet is empty

Posted: 26.07.2017, 13:49
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?

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

Posted: 03.08.2017, 09:41
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;