Dotnet-Project Framework documentation.

GenericDataHelper.ExecuteNonQueryTransactional Method (CommandType, String)

Execute a Command (that returns no resultset and takes no parameters) against a Transaction. If an error occur, changes are rollebacked.

public static int ExecuteNonQueryTransactional(
   CommandType commandType,
   string commandText
);

Parameters

commandType
The CommandType (stored procedure, text, etc.)
commandText
The stored procedure name or T-SQL command

Return Value

An int representing the number of rows affected by the command

Example

int result = ExecuteNonQuery(CommandType.StoredProcedure, "PublishOrders");

See Also

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