Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
LOCATE
Message
De
21/08/2000 12:04:35
 
 
À
21/08/2000 11:52:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: LOCATE
Divers
Thread ID:
00407349
Message ID:
00407357
Vues:
24
>help!
>what am I doing wrong here. It returns an error saying is missing a comma.
>Can I use the LOCATE here?
>
>IIF(LOCATE FOR temp.Fyr = '2002' AND temp.source '777'),temp.descr," ")

LOCATE is a command, not a function. It does not return anything.
You're missing an "=" between temp.source and '777' too.
Also, the IIF is terminated after '777' - you've got too many ")"s

Use LOCATE then FOUND() - or better yet, SEEK() on a tag.
LOCATE FOR temp.fyr = '2002' AND temp.source = '777'
lcDesc= IIF(FOUND(),temp.descr," ")
better
** need INDEX ON fyr+source TAG tagname
lcSearch = PADR("2002",FSIZE("fyr","temp"))+PADR("777",FSIZE("source","temp"))
lcDesc = IIF(SEEK(lcSearch,"temp","tagname"),temp.descr," ")
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform