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 16:27:07
Mike Yearwood
Toronto, Ontario, Canada
 
 
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:
01152460
Views:
22
SEE????
Wow, fact comes back to haunt me. I just discussed how people should not be putting so much stuff in a combobox, and here we are. :)

>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform