Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GO TOP before SEEK?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00471932
Message ID:
00472849
Vues:
37
Hi Steve.

>> Between LOCATE and SQL and SCAN (none of which require a SET ORDER), why SEEK at all? <<

Oh, I almost forgot. SEEK does not require a SET ORDER to anything or even that you change work areas (which, BTW, you DO have to do if you are going to use LOCATE). Compare this:
IF SEEK( < MyValue >, '< MyAlias >', '< MyTag >' )
   *** Record is found. Do something
ENDIF
To what you need to do the same thing with LOCATE:
lnSelect = SELECT()
SELECT < MyAlias >
LOCATE FOR < SomeCondition >
IF FOUND()
   *** Record is found. Do something
ENDIF
SELECT ( lnSelect )
Less code means fewer bugs ;-)

Marcia
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform