Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cant get home from endscan
Message
De
13/06/2013 04:17:21
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
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01576184
Message ID:
01576202
Vues:
53
>tnx Naomi - Using 'locate' how would you determine if a match was not found. I am avoiding seek because of the indexing.
locate for {expression here}
if found()
   {some code here}
endif
Locate IS using your index, if available and applicable to the search expression, however it will internally create a bitmap of records where that expression is true, in case you want a loop similar to a scan for, like this
locate for {expression here}
do while found()
   {some code here}
   continue
enddo
The Continue command just repeats the search using the same expression, starting from the current record. This is the old way of doing scan for (before scan was introduced in 1991), which was still useful (the cached bitmap helps to speed it up) so it's still available and will be.

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