You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 1, 2018. It is now read-only.
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(SqlClientclient=newSqlClient()){client.CommandText="DELETE FROM table WHERE id = @id";client.Parameters.Add("@id",SqlDbType.Int).Value=5;client.ExecuteNonQuery();}
Visual Basic .NET
UsingclientAsNewSqlClient()client.CommandText="DELETE FROM table WHERE id = @id"client.Parameters.Add("@id",SqlDbType.Int).Value=5client.ExecuteNonQuery()EndUsing