473,748 Members | 2,291 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is there an alternative to a combobox for selecting -- VB2005?

Greetings,

I have to load 30,000 unique names into a combox. Filling a dataTable takes
only a few milliseconds. But populating the combobox and displaying the list
takes several seconds - way too long. A user selects a name from the
combobox and runs a query.

Originally, this combox was on a form in an MS Access ADP which was linked
directly to our sql server. The combobox populated withins millisecnods.
How can I achieve this kind of performance in my VB2005 app? what is the
bottle neck here?

Thanks,
Rich
Jan 16 '07 #1
4 5109
30,000 items in a ComboBox, is just ridiculous. It might be nice an
convienient for you from a coding point of view but users are simply
incapable of dealing with that amount of information at once.

As you have found, MS Access has a lot of smarts (some might say dumbs) that
deal with this sort of stuff in the background but those 'features' are
specific to MS Access.

Surely there is some aspect about the 'list' of unique names that would
allow you to subset the information, say those unique names starting with
'A' or 'a'. This would mean that you only need to load a subset of the list
at any given time.
"Rich" <Ri**@discussio ns.microsoft.co mwrote in message
news:A9******** *************** ***********@mic rosoft.com...
One thing I noticed about the Access combobox is that it is not loading
everything all at once. Like when you scroll in the Access combobox there
is
hesitation while it loads data... Whereas, the VB2005 combobox loads all
the
data at once.

I would prefer to load the data as needed rather than all at once and have
the form that contains the combobox display right away. Is there a
property
setting in the comobox somewhere to achieve this kind of behavior?
"Rich" wrote:
>Greetings,

I have to load 30,000 unique names into a combox. Filling a dataTable
takes
only a few milliseconds. But populating the combobox and displaying the
list
takes several seconds - way too long. A user selects a name from the
combobox and runs a query.

Originally, this combox was on a form in an MS Access ADP which was
linked
directly to our sql server. The combobox populated withins millisecnods.
How can I achieve this kind of performance in my VB2005 app? what is the
bottle neck here?

Thanks,
Rich

Jan 17 '07 #2
rich,

I assume your users are aware that if they start typing the list will
automatically scroll - right! otherwise I bet your company has had to
replace quite a few mice over the past year (scroll wheel dieing)...

That being said ... here is a work around...

------------------------
- text box ...

- delay timer event ...

- popup window ...

= user control!
------------------------

- user starts entering the persons name...
- wait for a split second delay in the typing ... or after the first 3 chars
are recieved... something.
- popup a window ... just below the text box ... populate a grid control in
the window ... filtered list of the 30,000 people based on user entries ...
allow the user to select a value in the popup!

....

if the user wants to 'scroll the entire' list looking for Stewart Smith ...
give'em a hot-key to popup the window ... retrieve the first 2000 records
.... show the popup ... in the background continue populating the list!

But I agree with Stephany, your design is flawed if you are presenting the
user with a combo box of 30,000+ options! I once had a college manually
scrolling our clients list (2,000 records) to find Simpson Construction Ltd
.... she had been doing this for 3 years ... i work over, typed Simp ... the
selection was in the box ... u should have seen her expression! So,
hopefully, you do not have a user that thinks they need to scroll the entire
list to find employee ... Zoo Zoo ...
Jeff


"Rich" <Ri**@discussio ns.microsoft.co mwrote in message
news:A9******** *************** ***********@mic rosoft.com...
One thing I noticed about the Access combobox is that it is not loading
everything all at once. Like when you scroll in the Access combobox there
is
hesitation while it loads data... Whereas, the VB2005 combobox loads all
the
data at once.

I would prefer to load the data as needed rather than all at once and have
the form that contains the combobox display right away. Is there a
property
setting in the comobox somewhere to achieve this kind of behavior?
"Rich" wrote:
>Greetings,

I have to load 30,000 unique names into a combox. Filling a dataTable
takes
only a few milliseconds. But populating the combobox and displaying the
list
takes several seconds - way too long. A user selects a name from the
combobox and runs a query.

Originally, this combox was on a form in an MS Access ADP which was
linked
directly to our sql server. The combobox populated withins millisecnods.
How can I achieve this kind of performance in my VB2005 app? what is the
bottle neck here?

Thanks,
Rich

Jan 17 '07 #3

if you do this ... be careful not to create a lot of round trips to the
server...or a delay between the user entering a letter...

person enters SIM ...
delay after S to retrieve data and populate the combo box...
delay after I to retrieve data and populate the combo box... do not need to
retrieve ...S will have already populated cb with necessary records...
delay after M to retrieve data and populate the combo box ... do not need
this retrieve ... S will have already populated cb with necessary records...

person, clicks on the S and deletes it ... so ... not they have IM
delay ... combo box needs to retrieve and populate list...
user deletes M ... delay ... combo box needs to retrieve and populate
list...

you see where this is going ... you will be causing delay for the user and
you will have alot of round trips to the server.

plus, you will have to capture if the first letter the user entered has
changed ... causing your list to 'refilter'

The round trips are easy ... retrieve all the data for the list and cache it
in-memory...

The time will be 'purging the combo list' and 'refilling it'... this will
cause a delay ... the user will be typing and will not see anything...unti l
your have populated, purged, populated, purged, populated the combo box
value list.

I would recommend a timer event ... wait for a delay ... popup window ...
that 'looks' like a combo box.
Jeff.

"Rich" <Ri**@discussio ns.microsoft.co mwrote in message
news:22******** *************** ***********@mic rosoft.com...
Thank you all for your replies. I did think about the subset idea. The
issue is with the Autocomplete feature. My users don't scroll. They let
the
name autocomplete. I can achieve the autocomplete feature nicely if I
pull
all 30,000 names. My main thing was to check first to make sure I am not
going to reinvent the wheel by coming up with another solution I had in
mind.
So it looks like implementing my other solution might not be reinventing
the
wheel.

The user types a letter. On the key up stroke I pull data from the server
for all names that start with that letter and set the combobox datasource
to
that list and then do the drop down thing. Well, I will give something
like
that a try.

Thanks again all for your replies.

Rich

"Rich" wrote:
>Greetings,

I have to load 30,000 unique names into a combox. Filling a dataTable
takes
only a few milliseconds. But populating the combobox and displaying the
list
takes several seconds - way too long. A user selects a name from the
combobox and runs a query.

Originally, this combox was on a form in an MS Access ADP which was
linked
directly to our sql server. The combobox populated withins millisecnods.
How can I achieve this kind of performance in my VB2005 app? what is the
bottle neck here?

Thanks,
Rich

Jan 17 '07 #4
Check into using a DataView on the Dataset. You can set the RowFilter
property to something like "CompName LIKE '" & ComboBox.Text.T oString & "*'"
Since you said that the dataset is populated very quickly this will give you
a subset of the DataTable without having to go back to the server. It will
only show you a portion of the DataTable. If you put this in the TextChanged
event the DataView will be refreshed with each letter even if the user
deletes a letter or something like that.

"jeff" wrote:
>
if you do this ... be careful not to create a lot of round trips to the
server...or a delay between the user entering a letter...

person enters SIM ...
delay after S to retrieve data and populate the combo box...
delay after I to retrieve data and populate the combo box... do not need to
retrieve ...S will have already populated cb with necessary records...
delay after M to retrieve data and populate the combo box ... do not need
this retrieve ... S will have already populated cb with necessary records...

person, clicks on the S and deletes it ... so ... not they have IM
delay ... combo box needs to retrieve and populate list...
user deletes M ... delay ... combo box needs to retrieve and populate
list...

you see where this is going ... you will be causing delay for the user and
you will have alot of round trips to the server.

plus, you will have to capture if the first letter the user entered has
changed ... causing your list to 'refilter'

The round trips are easy ... retrieve all the data for the list and cache it
in-memory...

The time will be 'purging the combo list' and 'refilling it'... this will
cause a delay ... the user will be typing and will not see anything...unti l
your have populated, purged, populated, purged, populated the combo box
value list.

I would recommend a timer event ... wait for a delay ... popup window ...
that 'looks' like a combo box.
Jeff.

"Rich" <Ri**@discussio ns.microsoft.co mwrote in message
news:22******** *************** ***********@mic rosoft.com...
Thank you all for your replies. I did think about the subset idea. The
issue is with the Autocomplete feature. My users don't scroll. They let
the
name autocomplete. I can achieve the autocomplete feature nicely if I
pull
all 30,000 names. My main thing was to check first to make sure I am not
going to reinvent the wheel by coming up with another solution I had in
mind.
So it looks like implementing my other solution might not be reinventing
the
wheel.

The user types a letter. On the key up stroke I pull data from the server
for all names that start with that letter and set the combobox datasource
to
that list and then do the drop down thing. Well, I will give something
like
that a try.

Thanks again all for your replies.

Rich

"Rich" wrote:
Greetings,

I have to load 30,000 unique names into a combox. Filling a dataTable
takes
only a few milliseconds. But populating the combobox and displaying the
list
takes several seconds - way too long. A user selects a name from the
combobox and runs a query.

Originally, this combox was on a form in an MS Access ADP which was
linked
directly to our sql server. The combobox populated withins millisecnods.
How can I achieve this kind of performance in my VB2005 app? what is the
bottle neck here?

Thanks,
Rich


Jan 18 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
2261
by: Norm | last post by:
Hi, Each time the user selects an item from a combobox, I want that string to get appended to the values that were already selected. The result is that the combo is accumulating text each time the user selects an item from its list. I want the delete and backspace keys to function normally, as well as all the other properties of the combobox. Does anybody know the easiest way to do this?
5
2576
by: Claudio Di Flumeri | last post by:
Hi all, Iive found this bug int the VB combobox and I'd like to know if there is a way to solve it... Put a combobox in a form, and fill it with these 3 items: - athens - berlin - chicago then launch the program and enter in the form containing the combo. Click on the arrow near the combo, so the dropdown list under the combo appears and
8
2927
by: Gregory A Greenman | last post by:
I have a minor, but somewhat frustrating, problem. In a program I'm working on, I've got a tabcontrol that contains several other controls, a few of which are comboboxes. In the IDE, one of the comboboxes cannot be selected by clicking on it. If I click on this combobox, the tabcontrol itself is selected. I can select the combobox by choosing it from the list of controls in the Properties window or by dragging a rectangle around it. ...
7
4565
by: Simon Verona | last post by:
I posted this in dotnet.languages.vb.controls but thought I'd post here as well.. I have a combobox that is bound to a dataview generated from a dataset. The dataset has a single table (called "Data") with two columns "Id" and "Description". Id contains a code and description contains the description that is displayed in the combobox.
11
6617
by: Martin | last post by:
Hi all! In VB6.0 A combobox had items, which basically were the description and ItemData which could be used to create a link to a record, that is if the recordset had a numeric key. I was hoping that in VB2005 this would have been changed to an alphanumeric itemdata, so that no longer need to create an array "on the side" to store the key values. But I can't even find the itemdata anymore.
4
8641
by: Matt | last post by:
I have been searching all over the web for a way to sort a DataGridView based on the actual text being shown in a ComboBox column as opposed to the underlying value (an ID in this case). Can anyone tell me if this is even possible, and if so, how to do it? If this is completely impossible, how would you suggest going about sorting a ComboBox wherein the text displayed in the column is the client's name, and the underlying value is an ID? ...
2
8670
by: shumaker | last post by:
I have a combobox that is very much like the one found in the RSS project here: http://msdn.microsoft.com/vstudio/express/visualCSharp/learning/ My projectNameComboBox basically is filled with a list of values from a table, and as the user selects values, a datagrid displays related records from another table because it is bound via FK relationship. My table: /****** Object: Table . Script Date: 06/19/2006
19
4754
by: billa856 | last post by:
Hi, I have to use the table(PRODUCTION) already generated in MS Access in which all fields are of TEXT type.fields like (orderdate,palletno,customercode,itemno,pono,carto n,pcs,totalquantity)Now i have already some data in table like 6000 rows.Now in that some fields are blank. Now I have created one Form in MS Access in which there are three ComboBoxes.1st one is independent,2nd one is dependent on 1st one and,3rd one is dependent on both...
1
2491
by: beemomo | last post by:
hi everyone! i need to display all the data of a record in a form by selecting the value of combobox. for example when i select a Project_No display in combobox, the correspondence data of that record will be display on the controls such as textbox, others combo box , etc of the same form. what i've reached so far is displaying all the Project_No of the project in the combobox... Anyone has the solution? Any help will be appreciated,...
0
9558
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9378
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9331
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9253
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8250
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6077
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2216
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.