Dotnet-Project Framework documentation.

GenericDataHelper.ExecuteXmlReaderTransactional Method (IDbTransaction, String)

Execute a stored procedure via a Command (that returns a resultset) against the specified Transaction using the provided parameters.

public static XmlReader ExecuteXmlReaderTransactional(
   out IDbTransaction aTransaction,
   string spName
);

Parameters

aTransaction
The transaction used and that you must close.
spName
The stored procedure name using "FOR XML AUTO"

Return Value

An XmlReader containing the resultset generated by the command

Remarks

This method does not close the transaction created. You must close the transaction when you have finished to work with the XmlReader.

Example

IDbTransaction transation = null;
XmlReader r = ExecuteXmlReader(out transaction, "GetOrders");
/* Do work */
r.Close();
transation.Close();

See Also

GenericDataHelper Class | DotnetProject.Data Namespace | GenericDataHelper.ExecuteXmlReaderTransactional Overload List