Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
2
Erster Beitrag:
vor 8 Jahren, 10 Monaten
Letzter Beitrag:
vor 8 Jahren, 10 Monaten
Beteiligte Autoren:
Paulo Oliveira, John Marrone

Sort a table that is link to a file

Startbeitrag von John Marrone am 21.10.2009 17:25

Hi All

Is there any way that I can load a table and have it sorted by 2 fields 1 desc and the other asc. I have the table index but I have it link straight to a table. And I would like to have the table sorted in a particular order when the table loads the file. I looked at HFilter but just can not see how that function can do the job.

2. If I switch to a query I guess and just load the first 500 records it should not take to long to load. But here is my problem. I have a lot of places through out my app in my code where I address the fields in the database such as Races.ParLF. If I use a query as the data content for my table and the record pointer moves by selecting another row in the table will the record pointer in the Races data file move also to the correct record automatically. This way all my code is not broken. But I know how to sort the data by using a query. But better yet If I could just get the data to sort before the table loads it would be great but I don't see how HFilter can do the job. Can anyone share some suggestions or help me out here.

Thanks for any help.

Antworten:

tablesort can't be used because:
"for a browsing table, the sort is performed on a single column."

two possible ways:
1) create one composite key with this kind of sort and use it as the browsing key.
2) use one memory table and in the row selection code make hreadseek to the Races file.

von Paulo Oliveira - am 21.10.2009 18:01
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.