Locates are Rushmore optimizable too, so they can be just about as fast as a seek and can use more than one index to optimize. So for example if each of your fields has an index associated with it you can just do:
LOCATE FOR nField1=nSomeNumber AND cField2=cSomeChar AND cField3=cAnotherChar
Then use CONTINUE in your loop:
DO WHILE FOUND()
....
....
CONTINUE
ENDDO
>Ok, my problem is that I have to move the pointer to a certain a record
>in a table depending on the values of three fields (1 numeric, 2
>characters). Now, I've only used seek in cases where the expression
>is very simple (just one field).
>My questions are: can I use seek in this case? what would be the
>expressions of the index and the seek command? If this is impossible
>with seek, can I use locate instead and use an index to speed the process?
>what would be the expressions for this case?
>which one is faster locate or seek?
>
>one more question, can I use locate recursively? something like this:
>
> locate for field=var1
> do while found()
> if field2='ncc'
> this.method_Using_LocateDoWhile_with_same_table(var2)
> endif
> enddo
>
>
>TIA