Page 1 of 1

Working with Locate()

Posted: Thu 19 Nov 2015 06:57
by FCS
Hello,

I have a query which returns records with data sorted on a column like this:
aaaa
aaaa
bbbbbb
bbbbbb
bbbbbb
cccccc
cccccc
cccccc

Now I want iterate through all records containing the "bbbbb" value. To get the first "bbbbb" I can use the Locate function, but how to get next records with the "bbbbb" value?

Regards
Michal

Re: Working with Locate()

Posted: Thu 19 Nov 2015 07:11
by AlexP
Hello,

To locate the next/previous record, you can use the LocateEx method, where you need to specify the lxNext/lxUp search direction as the last parameter:

Code: Select all

UniQuery1.LocateEx('F_NAME', 'bbbbbb', [lxNext]);

Re: Working with Locate()

Posted: Thu 19 Nov 2015 07:32
by FCS
Thanks

Michal

Re: Working with Locate()

Posted: Thu 19 Nov 2015 07:54
by AlexP
You are welcome. Feel free to contact us if you have any further questions.