Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Network:
Windows 2003 Server
>There's no such thing in VFP as a record position in an index. What do you need it for?
>
>
>>I have a table, with two indexes. (In a cdx file)
>>
>>I need to know the new place in the table when the order changes.
>>ie if it is the second record in the table in sort order #1, what is it
>>in order #2.
>>
>>Let say that in order 1 it is the 2nd record, but in order #2 it would
>>be the fifth record.
>>How do I find out when I switch order, what position it's in?
>>
>>Can't use recno(), what other functions is there.
>>Mike
It's actually a cursor that has two sorts... as stated above.
I then have a control that lists them. (Custom as it is for a touch screen.)
When I populate the control, I go through the list, using the recno in naming the individual items.
Thus the 2nd record becomes object #2, when it is orginally sorted. ie the object is object2
When it is sorted in the other order, it might be object5 (if it is in the fifth position.) however since the recno is 2, my list still thinks its in second place.
I will add a field to the underlying cursor to hold a number independant of the cursor that I will populate after the sorts.
Thanks,
mike
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement