Count

<< Click to Display Table of Contents >>

Navigation:  Apollo VCL Components > Apollo VCL Component Reference > TApolloTable > TApolloTable Methods >

Count

Declaration

function Count: LongInt;

Description

Extracts the number of records in the table. This function respects the setting of all filters, scopes, query bitmaps, conditional indexes, and the setting of SetDeleted. It is the only count function that returns a completely accurate count of records depending upon all of the possible conditions that may be imposed on the table. It is also the slowest count function.

Return Value

The record count according to every possible condition imposed upon the table.

Delphi Example

// Display table info

with ApTbl do

begin

 Text1.Text := BaseDate; 

 Text2.Text := IntToStr( RecSize ); 

  // logical count

 Text3.Text := IntToStr( Count );

  // quickest count for query result

 Text4.Text := IntToStr( QueryRecCount );  

         // quickest count, all physical records }

 Text5.Text := IntToStr( RecCount );  

end;

C++Builder Example

// Display table info

Text1->Text = ApTbl->BaseDate();

Text2->Text = IntToStr( ApTbl->RecSize() );

// logical count

Text3->Text = IntToStr( ApTbl->Count() );

// quickest count for query result

Text4->Text = IntToStr( ApTbl->QueryRecCount() );

// quickest count, all physical records }

Text5->Text = IntToStr( ApTbl->RecCount );

See Also

QueryRecCount, RecCount, SQL COUNT

RecCount