Mediachase FileUploader.NET 1.9 Framework Help

SqlHelper.ExecuteReader Method (SqlTransaction, String, Object[])

Execute a stored procedure via a SqlCommand (that returns a resultset) against the specified SqlTransaction using the provided parameter 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.

[Visual Basic]
Overloads Public Shared Function ExecuteReader( _
   ByVal transaction As SqlTransaction, _
   ByVal spName As String, _
   ParamArray parameterValues As Object() _
) As SqlDataReader
[C#]
public static SqlDataReader ExecuteReader(
   SqlTransaction transaction,
   string spName,
   params object[] parameterValues
);

Parameters

transaction
a valid SqlTransaction
spName
the name of the stored procedure
parameterValues
an array of objects to be assigned as the input values of the stored procedure

Return Value

a SqlDataReader containing the resultset generated by the command

Remarks

This method provides no access to output parameters or the stored procedure's return value parameter. e.g.: SqlDataReader dr = ExecuteReader(trans, "GetOrders", 24, 36);

See Also

SqlHelper Class | Mediachase.FileUploader Namespace | SqlHelper.ExecuteReader Overload List