Insert Update Delete example in C# and VB.NET Using ExecuteNonQuery method
ExecuteNonQuery is a method from the SQlCommand Class in the System.Data.SqlClient namespace. It executes a T-SQL query and returns the number of rows affected. Below are examples of how to run an Insert, Delete, and Update statements using the ExecuteNonQuery method in both C# and VB.NET. Required namespaces C# using System.Data; using System.Data.SqlClient; VB.NET Imports... » read more