>>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.