Hi coldan,
it doesn't only seem so it's explicitly said in the help on RECCOUNT(): The value RECCOUNT( ) returns isn't affected by SET DELETED and SET FILTER.
RECCOUNT() does no more or less than read the total reccount from the dbf header, and that does not change when records are deleted or a table is filtered.
You really need to count.
besides
COUNT FOR NOT DELETED
you can also simply
Select Count(*) from table
This only counts undeleted records, if you SET DELETED ON.
What you can do to optimize the performance in VFP9 is have an index NDEX ON DELETED() TAG DeletedTag BINARY. This index will be used by Rushmore to optimize implicit and explicit filtering of deleted records.
JRB-Bldr
You're right with COUNT FOR NOT DELETED
But to SELECT or get only those records, which are not deleted, better simply SELECT * FROM TABLE or USE a table while SET DELETED is ON, don't use DELETED within SQL.
Even though in a simple SQL selecting only from one table you can use DELETED() in a where clause, even with such SQLs it doesn't make a performance difference if you have such a where clause or SET DELETED ON. So please just use the one a simple but strict rule and never use DELETED() in SQL. You might later extend some sql and overlook a DELETED() in there which then can really hurt.
I'd never suggest any SQL with DELETED() in it.
Bye, Olaf.