Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Pete Sass
  Where is Pete Sass?
 Marathon, Ontario
 Canada
 Pete Sass
 To: Lucy Alice Pilanga
  Where is Lucy Alice Pilanga?
 Metro Manila
 Philippines
 Lucy Alice Pilanga
 Tags
Subject: RE: delayng withs spaces
Thread ID: 33741 Message ID: 33889 # Views: 1 # Ratings: 0
Version: Visual FoxPro 8 Category: Databases, Tables and SQL Server
Date: Thursday, December 04, 2003 8:00:44 PM         
   


> or you could use alltrim() when locating for the record.
>
> locate for alltrim(field)=alltrim(var_id)
>
> -Lucy Alice
>

Hi,
I agree with Lucy. I see no reason you are padding the input at all. You are using VFP as a
backend?? not Oracle??
You can even setup an index based upon something like this:
INDEX ON UPPER(ALLTRIM(fieldname)) TAG MyIndex

In the example above, the index key always has the upper text values with the trailing blanks removed.
So even if the charcters are lower case in the textbox:
SEEK UPPER(Thisform.mytextbox.Value) will always work, same for the LOCATE command.


Pete from the Great White North. (Only in Canada, ay.) Over and Out ...


ENTIRE THREAD

delayng withs spaces Posted by matiass emanuel @ 12/2/2003 6:02:35 PM
RE: delayng withs spaces Posted by Yuri Rubinov @ 12/2/2003 7:39:15 PM
RE: delayng withs spaces Posted by ed fabonan @ 12/3/2003 1:12:42 AM
RE: delayng withs spaces Posted by lucy alice pilanga @ 12/3/2003 4:47:53 AM
RE: delayng withs spaces Posted by lucy alice pilanga @ 12/3/2003 5:06:07 AM
RE: delayng withs spaces Posted by Pete Sass @ 12/4/2003 8:00:44 PM