ExecuteSql.GetDataReader Method
Definition
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.
Overloads
GetDataReader(String) |
Execute a query and get a DataReader for the results. |
GetDataReader(String, SqlCommand) |
Execute a query and get a DataReader for the results. |
GetDataReader(String, SqlCommand) |
GetDataReader(String)
Execute a query and get a DataReader for the results.
public System.Data.SqlClient.SqlDataReader GetDataReader (string query);
public Microsoft.Data.SqlClient.SqlDataReader GetDataReader (string query);
member this.GetDataReader : string -> System.Data.SqlClient.SqlDataReader
member this.GetDataReader : string -> Microsoft.Data.SqlClient.SqlDataReader
Public Function GetDataReader (query As String) As SqlDataReader
Parameters
- query
- String
The query text before any parameterization or caching checks.
Returns
The data reader.
Applies to
GetDataReader(String, SqlCommand)
Execute a query and get a DataReader for the results.
public Microsoft.Data.SqlClient.SqlDataReader GetDataReader (string query, out Microsoft.Data.SqlClient.SqlCommand command);
member this.GetDataReader : string * SqlCommand -> Microsoft.Data.SqlClient.SqlDataReader
Public Function GetDataReader (query As String, ByRef command As SqlCommand) As SqlDataReader
Parameters
- query
- String
The query text before any parameterization or caching checks.
- command
- SqlCommand
The SqlCommand to use in case cancelling remaining reader processing is needed.
Returns
Applies to
GetDataReader(String, SqlCommand)
public System.Data.SqlClient.SqlDataReader GetDataReader (string query, out System.Data.SqlClient.SqlCommand command);
member this.GetDataReader : string * SqlCommand -> System.Data.SqlClient.SqlDataReader
Public Function GetDataReader (query As String, ByRef command As SqlCommand) As SqlDataReader
Parameters
- query
- String
- command
- SqlCommand