Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Function for all
Message
From
11/08/1999 04:08:10
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, United Kingdom
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00252341
Message ID:
00252384
Views:
8
>Whenever I want to search for a expression regardless of being
>capitals or not, I have to write as bellow:
>
>locate for UPPER(name) = UPPER(nm)
>locate for UPPER (city) = UPPER(Ct)
>locate for UPPER (street) = UPPER (st)
>
>I would like to avoid writting UPPER ( ) and instead of that, write something in my main.prg so that I could write as bellow:
>
>locate for name = nm
>locate for city = Ct
>locate for = BA
>
>
>May anybody suggest a function ?

When you create the index, set the colation sequence to anything other than MACHINE or UNIQWT. This will result in a case insensitive index, and not affect any other indexes.

LOCAL lcOldCol
lcOldCol = SET("COLLATE")
SET COLLATE TO "GENERAL"
SELECT table
INDEX ON name TAG name
SET COLLATE TO lcOldCol


? SEEK("Hello")
? SEEK("HELLO")
? SEEK("hello")
Regards
Mark

Microsoft VFP MCP
Menulib - OO Menus for VFP www.hidb.com/menulib
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform