Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filtering arrays...
Message
De
07/04/2004 10:50:28
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
07/04/2004 10:12:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00892752
Message ID:
00892930
Vues:
20
>Mike:
>
>Some of my forms can have up to 18 of these combos so I'm looking at reducing processor overhead. I want to have as much in position as I can for when these are called. What I'm doing is using 3 SQL's in the init of the form class to extract 3 different arrays, which correspond to 3 different fields in an addressbook table plus the filter field. In this table, there are several "groups", minimum 7 to whatever. It's these groups that I want to filter. If I use your suggestion, I'll have to filter the table and get the array up to 18 times. Ideally, I would have liked to use just one four column array, but three will do. If I use Cetin's suggestion, then I'll have to scan the array to find the end of one group and the beginning of another and have all these FOR.. ENDFOR.. loops, so that's not doin' it either. So there you have it. Any ideas?
>
>Luke

Lucien,
I think SQL rowsourcetype would still be the easy way for it. You might do those 3 SQLs into cursors and set rowsources to SQL selects from those cursors with filtering clause added.
OTOH with arrays you don't really need to scan arrays each time. Scanning arrays are very fast indeed but code there accomodates to values that you can't predict (ie: GTE unit_price 133.90 ). If your values were something continous like groupnumbers as 1,2,3... or .f./.t. then that loop would be replaced with a single ascan().
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform