Sunday , 26 January 2020
Breaking News

How to delete data from SQL Server in Visual C#

How to delete data from SQL Server in Visual C#

In this video you will see how to delete data from sql server using Visual C# Step by step.

con.Open();
string query = “delete from student where id='” + textBox1.Text + “‘”;
SqlDataAdapter sda = new SqlDataAdapter(query, con);
sda.SelectCommand.ExecuteNonQuery();
con.Close();
MessageBox.Show(“Record has been deleted successfully”);

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Translate »