Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Recursive loop and SCAN
Message
De
27/07/2002 01:33:52
 
 
À
27/07/2002 01:31:14
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00683191
Message ID:
00683221
Vues:
36
>Yes, it would open one alias per level; depending how deep your structure goes it may or may not be too much. One thing I know is that this becomes too slow (I've seen it done with a SQL select into a new cursor each level, then check if any records were selected), so my favorite technique was to build a key which would order the table into its proper tree order. It only took one rebuild for each save, and worked fine for the intended use (reports dictionary, with very few changes over time). Next time the table was simply open ordered by this key and scanned in a single linear pass.

In our case, it's for a treeview. The table is already properly ordered however I feel it's much more cleaner and simplier by using the recursive approach.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform