Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange Occurance with Seek
Message
 
À
25/10/2002 11:21:14
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00715466
Message ID:
00715490
Vues:
22
The blanks to the right of the the string are part of the accounting for the pad left function and the pointer argument:
? PADL([xxx],6) && returns "   xxx"
? PADL([xxx   ],6) && returns "xxx   "
* Also, let's assume the lookup (key) field is "xxx   " (note trailing blanks)
* Using SET EXACT ON/OFF will yield different results
SET EXACT ON
seek "xxx"  && Will NOT point to a "xxx   " key
* but
seek "xxx   " && Will (an exact match!) point to a "xxx   " key
* While
SET EXACT OFF
seek "xxx" && Will point to a "xxx   " key field.
HTH


>On our in house network with 2000 server the following code
>
>the_acct=alltrim(this.value)
>the_acct=padl(the_acct,6)
>seek the_acct
>
>works successfully (finds the_acct) on Win2000 workstations but not on Win98/XP machines.
>
>If I change the code to
>
>the_acct=padl(alltrim(this.value),6)
>seek the_acct
>
>it seems to work on all machines.
>
>Any explanation would be greatly appreciated.
Imagination is more important than knowledge
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform