With or without XBrowse, we need to know the number of records in a DBF which are not
deleted.
There is no simple function for this.
Does not matter whether SET
DELETED is ON or OFF:
Both LASTREC() and RECCOUNT() include
deleted records also.
ORDKEYCOUNT() also does not exclude
deleted records by itself, but honors filters, scopes and index expressions.
So,
1)
- Code: Select all Expand view
SET FILTER TO !DELETED()
? OrdKeyCount()
2)
- Code: Select all Expand view
INDEX ON RECNO() TAG RECS FOR !DELETED() // keep this index tag also
// then
? OrdKeyCount( "RECS" )
3)
- Code: Select all Expand view
INDEX ON RECNO() TAG DELS FOR DELETED() // kee this index tag also
? OrdKeyCount(0) - OrdKeyCount( "DELS" )