Execute a stored procedure via an IDbCommand (that returns a 1x1 resultset) against the specified IDbTransaction 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 parameter order.

Namespace: CodeSmith.Engine
Assembly: CodeSmith.Engine (in CodeSmith.Engine.dll) Version: 6.0.0.0 (7.0.0.15127)

Syntax

C#
public virtual Object ExecuteScalarTypedParams(
	IDbTransaction transaction,
	string spName,
	DataRow dataRow
)
Visual Basic
Public Overridable Function ExecuteScalarTypedParams ( 
	transaction As IDbTransaction,
	spName As String,
	dataRow As DataRow
) As Object

Parameters

transaction
Type: System.Data..::..IDbTransaction
A valid IDbTransaction 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: Object
An object containing the value in the 1x1 resultset generated by the command

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionThrown if spName is null
System..::..ArgumentNullExceptionThrown if transaction is null
System..::..ArgumentNullExceptionThrown if transaction.Connection is null

See Also