Counts the number of records in a C/SIDE table.
Parameters
- Record
-
Type: Record
Refers to the table to be counted.
Property Value/Return Value
Type: Integer
The number of records in the table.
Remarks
Example
This example requires that you create the following
variables.
Variable name |
DataType |
Subtype |
CustomerCount
|
Integer
|
|
CustomerRec
|
Record
|
Customer
|
|
Copy Code |
CustomerCount := CustomerRec.COUNT;
// This statement assigns the number of records in the Customer table
// to the CustomerCount variable. This statement is the same as:
CustomerCount := 0;
IF CustomerRec.FIND('-') THEN
REPEAT
CustomerCount := CustomerCount + 1;
UNTIL CustomerRec.NEXT = 0;
|
Retrieving the count by using the first statement in
the example is much faster because only one command to the Database
Management System (DMBS) is needed.
See Also