Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set key
Message
 
À
21/09/1998 10:33:39
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00138717
Message ID:
00139044
Vues:
31
Cetin,

>
*Sample code
>use exhiinfo
>set order to showfk
>set key to 6
>?seek(3, 'exhiinfo', "Accnum") && fails
>* Probably showfk=6 and accnum = 3 doesn't exist
>* or accnum=3 is not the first occurance
>locate for accnum=3 && showfk=6 and accnum=3
>

Your right on the second account accnum=3 does exist twice and I am looking for the second occurance. So what this means (if I understand this correctly) is that seek sees the first occurance and sees that it is not within the set key so it returns .f., right?

>set order to accnum  && Also does implicit "set key to"
>* this will locate a recordd that is outside the set key range
>?seek(3, 'exhiinfo', "Accnum") && locate first occurance accnum=3
>
>set key to && Already done implicitly
>

Thanks, I didn't relize that set order would change set key.  only makes sense though.

>set filter to showfk = 6
>locate
>?seek(3, 'exhiinfo', "Accnum") && this works
>* except SQL all commands respect to filter
Because seek looks for first occurance and should be able to move rec pointer as well.
>Cetin
>

Thanks, that helps.
Bud Wheeler
Vision Data Solutions, Inc.
Microsoft Partner

http://www.visionpace.com
Http://www.BudWheeler.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform