>>James,
>>
>>What I wrote (the performancewise bit) is imo the fastest you can get it in vfp, without dlls or flls
>>
>>>Your suggestion using FUNCTION CharBitNot looks good to me, as that's exactly what I do ... although the internals of my function are different:
>>>
>>>
FUNCTION Reversechars(lcChars)
>>> LOCAL lnI
>>> FOR lnI=1 TO LEN(lcChars)
>>> lcChars=STUFF(lcChars,lnI,1,CHR[255-ASC(SUBSTR(lcChars,lnI,1))])
>>> ENDFOR
>>> RETURN lcChars
>>>ENDPROC
>>>
>
>One thing would be much faster - and that is to avoid the repeated calculation of the ReverseChars (or Bitnot or whatever) function. If this index is going to be in heavy use, I'd have a shadow field of the reversed field, where I would store this reversed value (character field of same length, NoCPTrans), and index on that. The function would need to be invoked only when the actual field is updated. Something to delegate to a bizobject, or even lower.
TRUE. I would put it in the RecordValidation()
Gregory