Dotnet-Project Framework documentation.

GenericDataHelper.ExecuteNonQuery Method (CommandType, String, IDataParameter[])

Execute a Command (that returns no resultset) against the database using the provided parameters

public static int ExecuteNonQuery(
   CommandType commandType,
   string commandText,
   params IDataParameter[] commandParameters
);

Parameters

commandType
The CommandType (stored procedure, text, etc.)
commandText
The stored procedure name or T-SQL command
commandParameters
An array of Paramters used to execute the command

Return Value

An int representing the number of rows affected by the command

Example

int result = ExecuteNonQuery(CommandType.StoredProcedure, "PublishOrders", new SqlParameter("@prodid", 24));

See Also

GenericDataHelper Class | DotnetProject.Data Namespace | GenericDataHelper.ExecuteNonQuery Overload List