record position

Author: Rafael Copquin

Posted: 2015-03-23 at 17:34:44

I have this cursor containing a list of clients.

If I do not set any order (set order to 0), the records are shown in

physical order, so if I move the pointer 100 positions down, the record

position is given by recno(), in this case it would be 100.

However, if I order the records by company name and move the record

pointer 100 records down, even though the position would be 100 records

from the top, recno() is not going to tell me where I am.

I need to show that I am in the 100dhs position from the top, regardless

of the order.

I am dealing with a table containing 3 million records, and the

requirement is that the record position be shown very fast.

To clarify, I select the table with the 3KK records and try to find a

certain company. Because the table is now ordered by company name, I

can't use recno() to tell in which position the found company is. If I

move the pointer down or up, the position should move one up or down.

For instance, seek 'WIDGET CO'

The actual record number, as per recno() could be 2348897. However that

record position in the cursor could be 1200, if the pointer is moved one

down, the position would be 1201, or if it were to be moved one up, the

position would be 1199.

So, how can I determine the record position as opposed to recno() if the

table is in any particular order, such as company name ?

Is there a function that can be used?

Rafael Copquin

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/55109504.5000406@fibertel.com.ar

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2015 Rafael Copquin