SqlHelper..::..ExecuteNonQueryTypedParams Method (SqlTransaction, String, DataRow)

Execute a stored procedure via a SqlCommand (that returns no resultset) against the specified SqlTransaction using the dataRow column values as the stored procedure's parameters 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 row values.

Namespace:  Core
Assembly:  Core (in Core.dll)

Syntax


public static int ExecuteNonQueryTypedParams(
	SqlTransaction transaction,
	string spName,
	DataRow dataRow
)

Parameters

transaction
Type: SqlTransaction
A valid SqlTransaction object
spName
Type: String
The name of the stored procedure
dataRow
Type: DataRow
The dataRow used to hold the stored procedure's parameter values.

Return Value

An int representing the number of rows affected by the command

Exceptions


ExceptionCondition
ArgumentNullException transaction or spName
ArgumentExceptionThe transaction was rollbacked or commited, please provide an open transaction. - transaction