Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SEEK command
Message
From
27/04/1998 09:18:32
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
25/04/1998 19:18:25
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00094815
Message ID:
00095102
Views:
35
>Using the Upper() in the index is sometimes problematic because it makes Rushmore optimization a little trickier. (You have to always use the upper() in the operation.) Nonetheless, it is probably a good idea to use it with a client name. Anyway, Quinn - here's the solution all put together and guaranteed to work:
>
>Now:
>1. Select Client && Assuming client is the name of your client table
>2. Index on Upper(Cl_Name) Tag UCl_name && cl_name is the client name field
>
>

>Later, in your code:
>1. Make sure the client table is in use in Some workarea.
>2. l_lRetVal = ;
> Seek(PadR(Upper(txtTextBox.Value),FSize('cl_name','clients'));
> ,'clients','UCl_name')
>
>If that doesn't work, shoot me.

If this doesn't save your life, don't shoot me: using other collating sequences (like "General", "uniqwt" or any national sequence) creates indexes where upper and lower are not distinguished, so this wouldn't have happened in the first place. This way it really doesn't matter if you seek(lower(locclient)), seek(proper(locclient)) or seek(upper(locclient)) - it finds it all three times if it exists.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform