SqlHelper..::..ExecuteReader Method (SqlTransaction, CommandType, String)

Execute a SqlCommand (that returns a resultset and takes no parameters) against the provided SqlTransaction.

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

Syntax


public static SqlDataReader ExecuteReader(
	SqlTransaction transaction,
	CommandType commandType,
	string commandText
)

Parameters

transaction
Type: SqlTransaction
A valid SqlTransaction
commandType
Type: CommandType
The CommandType (stored procedure, text, etc.)
commandText
Type: String
The stored procedure name or T-SQL command

Return Value

A SqlDataReader containing the resultset generated by the command

Remarks


e.g.: SqlDataReader dr = ExecuteReader(trans, CommandType.StoredProcedure, "GetOrders");