Export (0) Print
Expand All

ServerConnection.ExecuteReader Method (String, SqlCommand)

Executes a reader using a SqlDataReader object value that contains one or more result sets.

Namespace:  Microsoft.SqlServer.Management.Common
Assembly:  Microsoft.SqlServer.ConnectionInfo (in Microsoft.SqlServer.ConnectionInfo.dll)

public SqlDataReader ExecuteReader(
	string sqlCommand,
	out SqlCommand command
)

Parameters

sqlCommand
Type: String
A String value that specifies the Transact-SQL commands to be executed.
command
Type: SqlCommand
A SqlCommand object that can be used to cancel the SqlDataReader pipe to terminate a long-running command.

Return Value

Type: SqlDataReader
A SqlDataReader object value that contains one or more result sets.

The SqlDataReader object is returned to let the client process the data without requiring it to read all information into memory.

Community Additions

ADD
Show:
© 2014 Microsoft