Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Function for all
Message
De
11/08/1999 11:06:29
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
11/08/1999 04:08:10
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00252341
Message ID:
00252544
Vues:
9
>>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")

Locate will respect the Set("collate") regardless of index. It actually influences string comparison - just try ?"Smith"="smiTH" under Machine and General - and you'll get different results. Therefore, Locate will work even with no index set, but for a case-blind Seek, you're right.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform