GetDataReader 方法 (String, SqlCommand)

不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 Gets a data reader to execute the specified Transact-SQL statements, and specifying a SqlCommand object that can be used to terminate a long-running query.

命名空间:  Microsoft.SqlServer.Management.Sdk.Sfc
程序集:  Microsoft.SqlServer.Management.Sdk.Sfc(在 Microsoft.SqlServer.Management.Sdk.Sfc.dll 中)

语法

声明
Public Function GetDataReader ( _
    query As String, _
    <OutAttribute> ByRef command As SqlCommand _
) As SqlDataReader
用法
Dim instance As ExecuteSql
Dim query As String
Dim command As SqlCommand
Dim returnValue As SqlDataReader

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

参数

返回值

类型:System.Data.SqlClient. . :: . .SqlDataReader
A SqlDataReader object that can be used to process the result sets returned by the Transact-SQL statements.