Subject Re: [IBO] Re: Query.Locate -with OrderingItems & OrderingLinks
Author Jason Wharton
> I am not trying to step through the dataset, just go to the first
> occurrence, example:
>
> * I have a dataset with fields "Salesperson", "ID"
> * "Salesperson" has many repeats, "ID" is unique
> * With OrderingItems of "salesperson, id; salesperson desc, id desc"
> * I want to issue some command that will take me to the
> first occurrence of a "salesperson"
> * I thought "query.locate(('salesperson', 'GARY', [lopPartialKey,
> lopFindNearest]);
> * Would do so, but even though it takes me to a record
> with "GARY", it is not the first.
> * I only want to position to the first record with "GARY"
> not step to the next from where I am.
>
> Is there some other command I should be using? Do
> I need to write some code that will cycle through the
> records until it finds the right one (I can, I just
> thought Locate was suppose to do that)?

Yes, it should. I confirmed this works in general. You are going to need to
send me a sample case of this not working for me to give it a closer look.

Reegards,
Jason Wharton