SqlHelper..::..ExecuteScalarTypedParams Method (String, String, DataRow)

Execute a stored procedure via a SqlCommand (that returns a 1x1 resultset) against the database specified in the connection string 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:  Core
Assembly:  Core (in Core.dll)

Syntax


public static Object ExecuteScalarTypedParams(
	string connectionString,
	string spName,
	DataRow dataRow
)

Parameters

connectionString
Type: String
A valid connection string for a SqlConnection
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 object containing the value in the 1x1 resultset generated by the command

Exceptions


ExceptionCondition
ArgumentNullException connectionString or spName