Dotnet-Project Framework documentation.

GenericDataHelper.ExecuteNonQueryTransactional Method (String, IDataParameter[])

Execute a stored procedure via a Command (that returns no resultset) against the DataBase using the provided parameters in a transaction. If an error occur, changes are rollebacked.

public static int ExecuteNonQueryTransactional(
   string spName,
   params IDataParameter[] commandParameters
);

Parameters

spName
The stored procedure name
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("PublishOrders", new SqlParameter("@prodid", 24));

See Also

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