Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to count buffered records without moving record poin
Message
 
To
07/02/2009 12:13:03
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01379822
Message ID:
01380269
Views:
49
>>>>Is there any way to count records in a buffered (mode 5) view without moving the record pointer?
>>>
>>>Check new WITH (buffering) option of Select-SQL. I'm not sure how does it work internally and it is a slow option, be aware.
>>
>>Thanks! These record sets are small so speed is not an issue.
>
>You may also
>
>select 0
>use (dbf("myalias")) again alias (sys(2015))
>count to x
>use
>
>Not sure it would exactly work - i.e. it will work, but I'm not sure it will share the buffers (and give the right count), but if it does, it costs almost nothing in resources, and it has its own order (in case indexes exist) and record pointer. If there's a filter, you may need to reapply it, because filter applies to alias.
>
>Didn't try this approach for a while - from the last time I did, I remember that changes to one alias were reflected in the other immediately, but can't be sure whether any buffering was involved then.

Seems like there should be an easy way to do this like reccount could have a parameter to respect "set deleted" or something. Oh well... Got it done. Thanks!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform