Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fastest way to populate combobox with 10t+records
Message
From
08/09/2006 15:10:17
 
 
To
08/09/2006 14:48:53
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
01152310
Message ID:
01152445
Views:
30
>>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.

Sure, something like that should work.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform