C# : Searching Records Using a ComboBox with SQL Server


SEARCHdataCBOfig.3In searching records in the database, we commonly use the TextBox because in a TextBox it is easy for you to type the data that you want to search. While a ComboBox is a bit different from the TextBox because the data that you are going to search is already given and you just have to select whatever data that is on the list of a ComboBox.


For the database of this project just click here.


Let’s begin:

  • Open Microsoft Visual Studio 2008, create a new windows form application and do the form just like this.


  • Go to the solution explorer and hit the “View Code” to fire the code editor.


  • In the code editor, initialize the SQL class system.

  • Create a method for displaying data in the dataGridView.

  • Set up the connection between SQL Server and C#.net. After that, call a retrieve method that you have created.

  • Go back to the design views, double-click the ComboBox and do the following codes for searching records in the database.

For all students who need a programmer for your thesis system or anyone who needs a source code in any programming languages. You can contact me @ :

Email – [email protected]
Mobile No. – 09305235027 – talk’nText


Download Sourcecode

Looking for more source code? Type your keyword here here!


Please enter your comment!
Please enter your name here

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