table.RECORDS_GET Function
Syntax
Number_of_Records as N = Records_Get()
Description
Returns the number of records in the table.
Discussion
The <TBL>.RECORDS_GET() method returns the Number_of_Records in the open table referenced by <TBL>. Deleted records are not included in the count. To determine the number of deleted records that are still consuming space in a table, use the <TBL>.RECORDS_DELETED() method. To determine the number of records in an index or query list use the <INDEX>.RECORDS_GET() method.
Example
This script shows an alternative way to fetch through all the records in a table, without using the <TBL>.FETCH_EOF() method.
tbl = table.open("c:\a5\a_sports\customer.dbf") tbl.fetch_first() count = tbl.records_get() for i = 1 TO count trace.write("Record #:" + str(i)) trace.writeln(" " + tbl.last_name) tbl.fetch_next() next i tbl.close()
See Also