SqlHelper..::..ExecuteXmlReader 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 XmlReader ExecuteXmlReader(
	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 using "FOR XML AUTO"

Return Value

An XmlReader containing the resultset generated by the command

Remarks


e.g.: XmlReader r = ExecuteXmlReader(trans, CommandType.StoredProcedure, "GetOrders");