Nbrecord
nbrecord returns the number of lines in a database table.
nbrecord(CLASS)
CLASS is a class associated with an opened table. # How many customers and items?
Local Integer CUST_COUNT, ITEM_COUNT
Local File BPCUSTOMER [BPC], ITMMASTER [ITM]
CUST_COUNT=nbrecord([BPC])
ITEM_COUNT=nbrecord([ITM])
nbrecord returns the number of lines on a table opened by File or Trbegin.
It performs a Select count(*) From TABLE.
The type of result is Integer or Decimal.
No Where clause is used on the count, even if Where conditions have been given on the table declaration or in a Filter statement. If the count must be done on a selection, rowcount must be used.
| Error code | Description |
|---|---|
| 7 | The table is not opened. |