Multiple Delete Using C# and SQL Server

0
160

MultiDELSQLfig.3This time, I will teach you how to delete multiple data using C# and SQL server 2005. With this, you can delete multiple data in just a click. This is the smart way to delete test data that have been saved in the database.

 

So Lets get started.

 

Create a database and name it “persondb”.

After that, create a table in the database that you have created.

Now , open Microsoft Visual Studio 2008 and create new Windows Form Application for C#. Then do the following design of a Form as shown below.

MultiDELSQLfig.1

After that, go to the Solution Explorer, double click the “View Code”  to display the code editor.

MultiDELSQLfig.2

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, establish a connection betweenSQL server and C#.net and retrieve the data in the database in the first load of the Form. 

 

After that, double click the “Delete” button and do the following code in the method. This code is for deleting multiple data in just a click.

Output:

MultiDELSQLfig.3

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

Facebook Comments

LEAVE A REPLY

Please enter your comment!
Please enter your name here