Page 1 of 1

DbCombo Problem

Posted: Fri Jul 27, 2007 1:49 pm
by Milan Mehta
Dear All,

I have over 12000 items in one dbf file which I use in DbCombo. But it takes a very long time to load. I have observed that it does not happen that way with listbox. Can I do something to speedup Dbcombo ?

Secondly search get starts a fresh with space character. But I want to find something which has space in between. How can I search that ?

TIA
Milan.

Posted: Fri Jul 27, 2007 2:09 pm
by James Bott
Milan,

Both are valid concerns, but not easily solvable.

DBCombo inherits from TCombobox and TCombobox uses an array to hold the list, so there will be a lag time each time the control is created. You could store the list in a static array instead of loading it each time, but a list that large will take up some memory and it will not contain any updates made to the DBF when the application is running.

An alternative is to just use a small button next to a Get and call another dialog containing a listbox and a get for doing an incremental search. This would be much faster and not require any memory overhead.

Regarding the space issue, I had to pick a key to reset the search and a space seemed like a good one at the time. The reset key has to be something users will think of trying or accidentally discover since we have no easy way of displaying this information. I will see how difficult it may be to make this key into a data element so you can change it to any key you wish. I'll put in on my To Do list.

James