Execute an IDbCommand (that returns a resultset) against the specified IDbConnection
using the provided parameters.
Namespace: CodeSmith.EngineAssembly: CodeSmith.Engine (in CodeSmith.Engine.dll) Version: 6.0.0.0 (7.0.0.15127)
Syntax
C# |
---|
public virtual IDataReader ExecuteReader(
IDbConnection connection,
CommandType commandType,
string commandText,
params IDataParameter[] commandParameters
) |
Visual Basic |
---|
Public Overridable Function ExecuteReader (
connection As IDbConnection,
commandType As CommandType,
commandText As String,
ParamArray commandParameters As IDataParameter()
) As IDataReader |
Return Value
Type:
IDataReaderan IDataReader containing the resultset generated by the command
Examples
| Copy |
---|
IDataReader dr = helper.ExecuteReader(conn, CommandType.StoredProcedure, "GetOrders", new IDataParameter("@prodid", 24)); |
Exceptions
See Also