Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RECCOUNT() of non-deleted records
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01061419
Message ID:
01061434
Views:
10
>>>How can I get a RECCOUNT() of the currently selected cursor of just the undeleted records?
>>>
>>>thanks
>>>
>>Brenda,
>>
>>If the cursor was created by an SQL statement, _TALLY will tell you. If I understand you correctly, you can add NOT DELETED() to the SQL WHERE clause to eliminate them.
>
>
>I do not understand. I have a curor AAA. The cursor is already created. I have no idea how it was created. I just need to know how many records are in AAA that are not deleted. I can not do RECCOUNT('AAA') because it gives all the records.
>
Brenda,

If the cursor is a filter on the table, then DELETED() will tell you. Otherwise, there's no reliable way to tell. Try this...
CREATE CURSOR Foo (MyField I)
APPEND BLANK
REPLACE Myfield WITH 0
DELETE
SELECT * FROM Foo INTO CURSOR Goo
BROWSE LAST
You'll see that the record in Goo it marked for deletion. Now try this
SELECT SUM(Myfield) FROM Foo INTO CURSOR Goo
You'll see that it isn't.

The only reliable way is to examine the code that creates the cursor.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform