Skip to content

ExecuteReader Method ​

Definition ​

  • Namespace: JASE.Database
  • Assembly: JASE.Database.dll

Reader ExecuteReader(string command, IReadOnlyList<IParameter> parameters = null, bool doFirstRead = null, bool allowBatch = null, CommandType commandType = null, bool enableReaderTracking = null, int commandTimeout = null) ​

csharp
Reader ExecuteReader(string command, IReadOnlyList<IParameter> parameters = null, bool doFirstRead = null, bool allowBatch = null, CommandType commandType = null, bool enableReaderTracking = null, int commandTimeout = null)

Executes a database query and returns a Reader to read the results.

Parameters ​

NameDescription
allowBatchIf true, allows batch SQL statements; otherwise, throws if a batch is detected.
commandThe SQL command or stored procedure name to execute.
commandTimeoutThe command timeout in seconds, or -1 to use the default.
commandTypeThe type of command (e.g., Text, StoredProcedure).
doFirstReadIf true, reads the first row of the result set asynchronously.
enableReaderTrackingIf , tracks the returned Reader instance so it can be managed and disposed by the connection/session lifecycle; otherwise, the caller is solely responsible for disposing the reader.
parametersThe parameters to bind to the command, if any.

Returns ​

A Reader containing the query results.