Using textbox autocomplete with an sql database

Hi, I'm having trouble trying to get my textboxs auto complete feature to read from a table from an sql database.

The table contains information like this....

          Name              Age            Job
           Joe                 45              Sales assit
           Mike                34              IT consult
            Jeff                37              manager
           John                33             None
           Jerry               23             sales

I want the autocomplete feature to read from the table (table1) and the column Name. So when 'jo' is typed the options joe and john are displayed. Could someone please explain a way to get this to work? any advice would be great, thanks.
Cannibal_JackAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

boro_bobCommented:
Here is a link to the Scriptaculous web site which has a great auto complete feature which I have used in the past. Its pretty easy to set up.

http://wiki.script.aculo.us/scriptaculous/show/Autocompletion
0
Cannibal_JackAuthor Commented:
I'd really like to achieve it by just using the features built into 2005 express. Is that possible?
0
Bob LearnedCommented:
1) Set up the TextBox:

   AutoCompleteMode = Suggest
   AutoCompleteSource = CustomSource

2) Get a DataTable with unique names from the table.

3) Loop through the DataRow elements for the DataTable, and get the names, and add them to the AutoCompleteCustomSource collection.

Bob
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.