Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread RecordCount
Fri, Feb 14 2014 1:05 PMPermanent Link

John Postnikoff


I am trying to save the RecordCount from a query to a var to simply show how many rows I have from from the query results so I can trigger some other events, or build some exceptions.   Looking for an example.

John
Mon, Feb 17 2014 7:28 PMPermanent Link

John Easley

Just use the RecordCount from the query component.

Var
  RecNums: integer;
begin
 DbisamQuery1.Open;
 RecNums := DbisamQuery1.recordcount;
 if RecNums = 0 then
   raise exception.create('No records found');
end;

John

John Postnikoff wrote:


I am trying to save the RecordCount from a query to a var to simply show how many rows I have from from the query results so I can trigger some other events, or build some exceptions.   Looking for an example.

John
Tue, Feb 18 2014 4:38 PMPermanent Link

John Postnikoff

Thanks John,

I had something very simple mixed up.

John Easley wrote:

Just use the RecordCount from the query component.

Var
  RecNums: integer;
begin
 DbisamQuery1.Open;
 RecNums := DbisamQuery1.recordcount;
 if RecNums = 0 then
   raise exception.create('No records found');
end;

John

John Postnikoff wrote:


I am trying to save the RecordCount from a query to a var to simply show how many rows I have from from the query results so I can trigger some other events, or build some exceptions.   Looking for an example.

John
Image