How to Search Data in the ListView Using C# and SQL Server

0
754

SearchSQLListViewOutputToday, you will learn how to Search Data in the ListView Using a TextBox in C#.net and SQL Server 2005 Express Edition. This functionality will help you search records in the ListView. I’m going to use here, Microsorf Visual Studio 2008 for creating this project.

 

Let’s begin:

 

1. Create a database and name it “dbsubject”.

2. Create a table in the database that you have created.

3. Do the following query for inserting data in the table that you have created.

4. Open Microsoft Visual Studio 2008 and create new Windows Form Application for C#. Then, do the Form just like this.

SearchSQLListViewFig.1

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

SearchSQLListViewFig.2

6. Declare all the classes that are needed.

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

7. Create a method for displaying data in the ListView.
8. Establish a connection between SQL server and C#.net and retrieve the data in the database to display in the ListView
9. Go back to the design views, double click the TextBox and do the following codes for searching data in the ListView.
 

Output:

SearchSQLListViewOutput

 

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

 

Download Sourcecode

Facebook Comments

LEAVE A REPLY

Please enter your comment!
Please enter your name here