Dotnet-Project Framework documentation.

GenericDataHelper.ExecuteXmlReaderTransactional Method (IDbTransaction, String, Object[])

Execute a stored procedure via a Command (that returns a resultset) against the specified Transaction 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.

public static XmlReader ExecuteXmlReaderTransactional(
   out IDbTransaction aTransaction,
   string spName,
   params object[] parameterValues
);

Parameters

aTransaction
The transaction used and that you must close.
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 dataset 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

This method provides no access to output parameters or the stored procedure's return value parameter.

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

See Also

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