Execute a stored procedure via an IDbCommand (that returns no resultset) against the specified IDbConnection
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: CodeSmith.EngineAssembly: CodeSmith.Engine (in CodeSmith.Engine.dll) Version: 6.0.0.0 (7.0.0.15127)
Syntax
C# |
---|
public virtual int ExecuteNonQueryTypedParams( IDbConnection connection, string spName, DataRow dataRow ) |
Visual Basic |
---|
Public Overridable Function ExecuteNonQueryTypedParams ( connection As IDbConnection, spName As String, dataRow As DataRow ) As Integer |
Parameters
- connection
- Type: System.Data..::..IDbConnection
A valid IDbConnection object
- spName
- Type: System..::..String
The name of the stored procedure
- dataRow
- Type: System.Data..::..DataRow
The dataRow used to hold the stored procedure's parameter values.
Return Value
Type: Int32An int representing the number of rows affected by the command
Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | Thrown if spName is null |
System..::..ArgumentNullException | Thrown if connection is null |