Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why is SEEK command showing error?
Message
 
À
07/09/2004 02:23:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00939863
Message ID:
00939970
Vues:
17
>>In my grand scheme to NOT have to "SELECT cMyTableName", I applied VFP seek structures. Its been a while since I reviewed the SEEK syntax, and was pleasantly surprised to see some new features. But I am hving problems making them work.
>>
>>
>>help shows the new (to me) features this way:
>>seek ckey ORDER TAG tagname of CDXFileName in cTableName)
>>
>>So I applied this syntax:
>>SEEK lcKey ORDER TAG lcKeyTag OF MyTable IN MyTable
>>

>>
>>I get an error saying variable lcKeyTag not found. I put quotes and colons around it to no avail:-) Any help appreciated!
>
>It might be expecting a name - did you try parentheses?
SEEK lcKey ORDER TAG (lcKeyTag) OF MyTable IN MyTable
I did try it that way (or a variation thereof:). VFP reported that it could not find the variable 'MyTable.CDX'. It seems VFP confused a CDX handle for a variable.

Borislav came up with a workaround:
SEEK lcKey ORDER lcKeyTag IN MyTable
There are a couple of xBase commands in VFP that don't structure as designated in VFP. FOr example, the RETURN command is advertised as:
RETURN myValue to MyProcedure
But this will actually generate a compile error. However, if we switch the arguments around:
RETURN TO MyProcedure MyValue
It works!
Thanks
Imagination is more important than knowledge
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform