Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Function for all
Message
De
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:
00252384
Vues:
7
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform