473,484 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Autocomplete with big lookup table

I'm creating a database Winforms application using VCS Express 2005

I have some large lookup tables (may be up to 500000 records) which
contains name and id and are stored in sql server.

I need to create single line combobox style control which:

1. Allows to type first characters in name
2. Auto-completes entered data by using first match
3. Allows to open picklist based by entered data and select name

I tried to use Combobox with lookup table.
I can set combobox autocomplete source to lookup table and autocomplete
window shows matches very well.

Lookup parts table is big, it takes a lot of time to load the
data source.

I think I need virtual combobox control with autocomplete and selection from
list.

Is is not reasonable to load whole table as combobox lookup table during
combobox
creation like ms doc sample recommends.
I have found 2 possibilities:

1. Add some code to combobox events to implement virtual mode. Is this
possible ?

2. Create textbox, selection button and use (virtual?) DataGridView to
emulate virtual dropdown list. In this case I must create UI in code
also.

Which way is better ?
Where to find more information about this ?

Andrus.
Feb 15 '07 #1
5 12637
Hi,

>
I have found 2 possibilities:

1. Add some code to combobox events to implement virtual mode. Is this
possible ?

2. Create textbox, selection button and use (virtual?) DataGridView to
emulate virtual dropdown list. In this case I must create UI in code
also.

Which way is better ?
Where to find more information about this ?
500K rows are WAY too much, you need to look for another way of displaying
the info.
Feb 15 '07 #2
I think what you want to do here is handle the keypress event, and after
there are at least 2 or 3 letters typed, you would use this as a filter in
the WHERE clause of your SQL Statement to return a small matching subset, and
bind this to your control.
There are a number of implementations of this for both Windows Forms and
ASP.NET, you can find them easily with a well-constructed google or live.com
search.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Andrus" wrote:
I'm creating a database Winforms application using VCS Express 2005

I have some large lookup tables (may be up to 500000 records) which
contains name and id and are stored in sql server.

I need to create single line combobox style control which:

1. Allows to type first characters in name
2. Auto-completes entered data by using first match
3. Allows to open picklist based by entered data and select name

I tried to use Combobox with lookup table.
I can set combobox autocomplete source to lookup table and autocomplete
window shows matches very well.

Lookup parts table is big, it takes a lot of time to load the
data source.

I think I need virtual combobox control with autocomplete and selection from
list.

Is is not reasonable to load whole table as combobox lookup table during
combobox
creation like ms doc sample recommends.
I have found 2 possibilities:

1. Add some code to combobox events to implement virtual mode. Is this
possible ?

2. Create textbox, selection button and use (virtual?) DataGridView to
emulate virtual dropdown list. In this case I must create UI in code
also.

Which way is better ?
Where to find more information about this ?

Andrus.
Feb 15 '07 #3
go to the first day of the next month and subtract one.

it's really not that complex
Public Function DaysLeftInMonth(DIn as Date) as Integer
'Dim DOut as Date
'DOut = DateSerial(Month(DIn), 1, Year(Din) - 1
'DaysLeftInMonth = DateDiff(d, DIn, Dout)
DaysLeftInMonth = DateDiff(d, DIn, DateSerial(Month(DIn), 1, Year(Din)
- 1)
End Function
On Feb 15, 11:48 am, "Andrus" <kobrule...@hot.eewrote:
I'm creating a database Winforms application using VCS Express 2005

I have some large lookup tables (may be up to 500000 records) which
contains name and id and are stored in sql server.

I need to create single line combobox style control which:

1. Allows to type first characters in name
2. Auto-completes entered data by using first match
3. Allows to open picklist based by entered data and select name

I tried to use Combobox with lookup table.
I can set combobox autocomplete source to lookup table and autocomplete
window shows matches very well.

Lookup parts table is big, it takes a lot of time to load the
data source.

I think I need virtual combobox control with autocomplete and selection from
list.

Is is not reasonable to load whole table as combobox lookup table during
combobox
creation like ms doc sample recommends.

I have found 2 possibilities:

1. Add some code to combobox events to implement virtual mode. Is this
possible ?

2. Create textbox, selection button and use (virtual?) DataGridView to
emulate virtual dropdown list. In this case I must create UI in code
also.

Which way is better ?
Where to find more information about this ?

Andrus.

Feb 15 '07 #4
500K rows are WAY too much, you need to look for another way of
displaying the info.
Thank you.
I'm not planning to load all data since user actually looks only very small
part of data.

I think I need a simple approach: autocomplete reads first match from sql
server.
Opening picklist shows and reads first 10 matched from server.
Scrolling in pick list reads next 10 records etc.

This works probably fast even without caching.

Do you have anyidea how to implement such combo ?
My major issue is which event I should capture in combobox or how to use
virtual grid for this.
I havent found any such sample.

Andrus
Feb 16 '07 #5
Thank you.

..NET combox has autosuggest feature.
I think I can use this. In this case there is no need to implement
autocomplete in my code.

In thi case I need to capture autosuggest not found event and in this event
read matching row from sql server.

I searched google.com and live.com for a keywords "c# combobox" and looked
for results. I read all combobox arcticles from codeproject.com

Most result describe creating auto-complete and multi-column combobox.

I havent found any which describes creating virtual combobox or similar
control.

Which keywords I should use to search or where to find information about
creating such control ?

Andrus.
"Peter Bromberg [C# MVP]" <pb*******@yahoo.yabbadabbadoo.comwrote in
message news:27**********************************@microsof t.com...
>I think what you want to do here is handle the keypress event, and after
there are at least 2 or 3 letters typed, you would use this as a filter in
the WHERE clause of your SQL Statement to return a small matching subset,
and
bind this to your control.
There are a number of implementations of this for both Windows Forms and
ASP.NET, you can find them easily with a well-constructed google or
live.com
search.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Andrus" wrote:
>I'm creating a database Winforms application using VCS Express 2005

I have some large lookup tables (may be up to 500000 records) which
contains name and id and are stored in sql server.

I need to create single line combobox style control which:

1. Allows to type first characters in name
2. Auto-completes entered data by using first match
3. Allows to open picklist based by entered data and select name

I tried to use Combobox with lookup table.
I can set combobox autocomplete source to lookup table and autocomplete
window shows matches very well.

Lookup parts table is big, it takes a lot of time to load the
data source.

I think I need virtual combobox control with autocomplete and selection
from
list.

Is is not reasonable to load whole table as combobox lookup table during
combobox
creation like ms doc sample recommends.
I have found 2 possibilities:

1. Add some code to combobox events to implement virtual mode. Is this
possible ?

2. Create textbox, selection button and use (virtual?) DataGridView to
emulate virtual dropdown list. In this case I must create UI in code
also.

Which way is better ?
Where to find more information about this ?

Andrus.

Feb 16 '07 #6

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

Similar topics

3
1962
by: Pete | last post by:
I'm currently doing a database that uses comboboxes to look up records in other tables, whether they be lookup tables or otherwise. When a user needs to add an item to one of these tables, the...
3
2904
by: my-wings | last post by:
I've been reading about how evil Lookup fields in tables are, but I've got to be missing something really basic. I know this subject has been covered before, because I've just spent an hour or two...
3
10604
by: google | last post by:
I have a database with four table. In one of the tables, I use about five lookup fields to get populate their dropdown list. I have read that lookup fields are really bad and may cause problems...
0
1195
by: Jim Bancroft | last post by:
I'm having some trouble mixing "AutoComplete" attributes and transactions with my VB .Net components. Right now, I have two classes --a "parent" and "child"-- that inherit from the .Net...
1
1698
by: Bob | last post by:
I am creating a page that does a lookup on a contacts table in my database. What is the best way to have the user type in part of the name and then display those that match? An autocomplete...
8
5725
by: nil | last post by:
Hello all, It's urgent... i want to add autocomplete textbox facility in my application like google. as you type it suggests option to the user..i want the same kind of facility...i know i...
1
3820
by: wkerplunk | last post by:
Below is what I have build with several different languages. It works great but I need help, I am stuck. When you click on an item in the dropdown autocomplete div it does a mousedown function...
1
3518
by: =?Utf-8?B?UmV5?= | last post by:
I have a textbox and linked that with the autocomplete extender I have created the webservice and the WebMethod and returns a ToArray to the textbox. Everything works when I type normal string...
0
7079
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7103
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,...
0
7137
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...
0
7194
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...
1
4838
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3044
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...
0
3038
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1355
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
587
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.