Dotnet-Project Framework documentation.

GenericDataHelper.ExecuteNonQuery Method (String, Object[])

Execute a stored procedure via a Command (that returns no resultset) against the database using the provided parameter values. This method will query the database to discover the parameters for the stored procedure (the first time each stored procedure is called), and assign the values based on parameter order.

public static int ExecuteNonQuery(
   string spName,
   params object[] parameterValues
);

Parameters

spName
The name of the stored prcedure
parameterValues
An array of objects to be assigned as the input values of the stored procedure

Return Value

An int representing the number of rows affected by the command

Example

This method provides no access to output parameters or the stored procedure's return value parameter.

int result = ExecuteNonQuery("PublishOrders", 24, 36);

See Also

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