ExecuteNonQuery - nemiro-net/nemiro.data.dll GitHub Wiki
The ExecuteNonQuery method of the SqlClient class is used to perform queries that return no results.
For example, to update or delete data.
C#
using (SqlClient client = new SqlClient())
{
client.CommandText = "DELETE FROM table WHERE id = @id";
client.Parameters.Add("@id", SqlDbType.Int).Value = 5;
client.ExecuteNonQuery();
}
Visual Basic .NET
Using client As New SqlClient()
client.CommandText = "DELETE FROM table WHERE id = @id"
client.Parameters.Add("@id", SqlDbType.Int).Value = 5
client.ExecuteNonQuery()
End Using