Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fastest way to populate combobox with 10t+records
Message
De
08/09/2006 14:48:53
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
08/09/2006 13:34:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
01152310
Message ID:
01152439
Vues:
29
>Are the data in the combobox static? If so, you could pull all the data across into a local cursor when your app starts and leave it there, ready to be used in your form.
>
>If not, and you have to freshly query the backend for each incremental seek, it's more challenging. Some possible strategies:
>
>1. Re-query the backend after each keystroke. Probably slow, and likely not necessary.
>
>2. Employ a separate text box, where the user types in the "search" string. Only after they leave that text box do you update the combo box contents. Most efficient but adds extra controls to the form.
>
>3. Same as #1, except you implement a timer so that queries happen only if the user pauses for "x" amount of time i.e. not while they are in the middle of typing multiple characters.

Actually, you can do this without timer. Set a property of the combo to be equal to seconds() in each .keypress or .valid (i.e. whichever events happen when user changes the value by typing or mousing), and check against its previous value. If greater than _dblclick, user is waiting.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform