Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to count buffered records without moving record poin
Message
De
07/02/2009 12:13:03
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01379822
Message ID:
01380018
Vues:
34
>>>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.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform