Autocomplete in a ComboBox Using C# and SQL Server


In this tutorial, I will teach you how to create an Autocomple in a Combobox using and SQL Server 2005. With this, it will suggest the records when you start to type in the combobox then, you don’t have to click anymore the dropdown or scroll down the list of records that you’re going to select.


Let’s begin:


Create a database and name it “dbcombo”.

After creating database, do the following query for creating a table in the database that you have created.

Open Microsoft Visual Studio 2008 and create new Windows Form Application for C#. Then do the following design of a Form just like this.


Go to the Solution Explorer, click the “View Code”  to view the code editor.


In the code editor, declare all the classes that are needed.

Note: Put using System.Data.SqlClient; above the namespace to access sql server library.

After declaring the classes, create a method for retrieving data in the database with autocomplete in a  ComboBox.

Finally, go back to the design view double click the form and create a connection between SQL server and Then, call the method that you have created.




For all students who need programmer for your thesis system or anyone who needs a sourcecode in any programming languages. You can contact me @ :
Email – [email protected]
Mobile No. – 09305235027 – tnt


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.