다음을 통해 공유


ServerConnection.ExecuteReader 메서드 (String, SqlCommand%)

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

네임스페이스:  Microsoft.SqlServer.Management.Common
어셈블리:  Microsoft.SqlServer.ConnectionInfo(Microsoft.SqlServer.ConnectionInfo.dll)

구문

‘선언
Public Function ExecuteReader ( _
    sqlCommand As String, _
    <OutAttribute> ByRef command As SqlCommand _
) As SqlDataReader
‘사용 방법
Dim instance As ServerConnection 
Dim sqlCommand As String 
Dim command As SqlCommand 
Dim returnValue As SqlDataReader 

returnValue = instance.ExecuteReader(sqlCommand, _
    command)
public SqlDataReader ExecuteReader(
    string sqlCommand,
    out SqlCommand command
)
public:
SqlDataReader^ ExecuteReader(
    String^ sqlCommand, 
    [OutAttribute] SqlCommand^% command
)
member ExecuteReader : 
        sqlCommand:string * 
        command:SqlCommand byref -> SqlDataReader
public function ExecuteReader(
    sqlCommand : String, 
    command : SqlCommand
) : SqlDataReader

매개 변수

  • sqlCommand
    유형: System.String
    A String value that specifies the Transact-SQL commands to be executed.

반환 값

유형: System.Data.SqlClient.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.

참고 항목

참조

ServerConnection 클래스

ExecuteReader 오버로드

Microsoft.SqlServer.Management.Common 네임스페이스