Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to tell if a table has no nondeleted records (empty)
Message
From
03/09/1998 00:34:17
Larry Long
ProgRes (Programming Resources)
Georgia, United States
 
 
To
02/09/1998 13:38:15
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00132456
Message ID:
00132650
Views:
20
>>how is an efficient way to tell if a table has no active records.
>>
>>thanks, brenda
>
>SET DELETED ON
>COUNT TO nTotal
>IF nTotal=0
>...
You should have and index tag on DELETED(), example...
INDEX ON DELETED() TAG ISDELETED
Having this will greatly increase performance if you have SET DELETED ON in your app.

Assuming you have done this, you could...

found_deleted=SEEK(.T.,'yourtable','ISDELETED')

or conversely...
found_active=SEEK(.F.,'yourtable','ISDELETED')

//:^)
L.A.Long
ProgRes
lalong1@charter.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform