Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

DbCommand.ExecuteReader Method

Definition

Namespace:
System.Data.Common
Assembly:
System.Data.Common.dll
Assemblies:
netstandard.dll, System.Data.Common.dll
Assembly:
System.Data.dll
Assembly:
netstandard.dll

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Executes the command against its connection, returning a DbDataReader that can be used to access the results.

Overloads

Name Description
ExecuteReader()

Executes the command against its connection, returning a DbDataReader that can be used to access the results.

ExecuteReader(CommandBehavior)

Executes the command against its connection, returning a DbDataReader that can be used to access the results.

ExecuteReader()

Source:
DbCommand.cs
Source:
DbCommand.cs
Source:
DbCommand.cs
Source:
DbCommand.cs
Source:
DbCommand.cs

Executes the command against its connection, returning a DbDataReader that can be used to access the results.

public:
 System::Data::Common::DbDataReader ^ ExecuteReader();
public System.Data.Common.DbDataReader ExecuteReader();
member this.ExecuteReader : unit -> System.Data.Common.DbDataReader
Public Function ExecuteReader () As DbDataReader

Returns

A DbDataReader object.

See also

Applies to

ExecuteReader(CommandBehavior)

Source:
DbCommand.cs
Source:
DbCommand.cs
Source:
DbCommand.cs
Source:
DbCommand.cs
Source:
DbCommand.cs

Executes the command against its connection, returning a DbDataReader that can be used to access the results.

public:
 System::Data::Common::DbDataReader ^ ExecuteReader(System::Data::CommandBehavior behavior);
public System.Data.Common.DbDataReader ExecuteReader(System.Data.CommandBehavior behavior);
member this.ExecuteReader : System.Data.CommandBehavior -> System.Data.Common.DbDataReader
Public Function ExecuteReader (behavior As CommandBehavior) As DbDataReader

Parameters

behavior
CommandBehavior

An instance of CommandBehavior, specifying options for command execution and data retrieval.

Returns

An DbDataReader object.

See also

Applies to


Feedback

Was this page helpful?