Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange Occurance with Seek
Message
 
To
25/10/2002 11:21:14
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgia, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00715466
Message ID:
00715490
Views:
21
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform