Subject Strange behavior of TIBOQuery.Locate method
Author Fernando Deola
(Using D6/Fb 1.0 821/IBO 4.2Ib/IBO TDataset descendants)

I have a table called PERSON (PK is ID_PERSON) indexed by SN_PERSON,
NM_PERSON, joined to a MEMBER (PK is ID_MEMBER) table as in the query
below (simplified):

SELECT
M.*, -> Keylinks: MEMBER.ID_MEMBER
P.NM_PERSON,
P.SN_PERSON,
FROM PERSON P
INNER JOIN MEMBER M
ON (M.ID_PERSON = P.ID_PERSON)

ORDER BY
P.SN_PERSON,
P.NM_PERSON

When I use IBOQuery.Locate('SN_PERSON,NM_PERSON',VarArrayOf[(SN,NM)],
[loCaseInsensitive, loPartialKey]), the following record is positioned:

ID_MEMBER SN_PERSON NM_PERSON
5 SMITH ANDERSON
1 SMITH JOHN <-- This one, instead of
ANDERSON !
3 SMITH THOMAS

Looks like Locate consider Keylinks or the PK for positioning, instead
of respecting the Order By clause... I assumed that Locate searched the
records in the buffer as they were.

Is it a bug or a misunderstanding from my part?

Thanks

Fernando Deola
EFEX Systems Ltda.
Blumenau - SC - Brasil