>Hi All:
>
>If I have an index on some field and the expression I'm searching for using SEEK() has leading or trailing blanks, I don't get a match. If I try an alltrim on the search expression and the index key, I still don't get a match. I appears that TRIM commands are ignored in index expressions.
>
>Charlie
You should only use TRIM in an index expression if you are concatenating 2 fields. Like
Index on trim(FirstName) + LastName. Otherwise, TRIM is not needed. You should also check settings for SET EXACT, SET COLLATE [among others] because these are scoped to each datasession. See SET DATASESSION in VFP Help for all SETs that are scoped to the DS.
Alos, on character data, you may consider using the UPPER or LOWER function to make SEEKs and LOCATEs case insensitive. Of course the parameter you are pasing needs to be converted to UPPER or LOWER, depending on the index.
Mark McCasland
Midlothian, TX USA