共用方式為


ExecuteSqlWithResults 方法

Executes a batch of Transact-SQL statements that expects one or more returned results sets on the specified instance of SQL Server.

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.SmoExtended (在 Microsoft.SqlServer.SmoExtended.dll 中)

語法

'宣告
Protected Function ExecuteSqlWithResults ( _
    server As Server, _
    cmd As String _
) As DataSet
'用途
Dim server As Server
Dim cmd As String
Dim returnValue As DataSet

returnValue = Me.ExecuteSqlWithResults(server, _
    cmd)
protected DataSet ExecuteSqlWithResults(
    Server server,
    string cmd
)
protected:
DataSet^ ExecuteSqlWithResults(
    Server^ server, 
    String^ cmd
)
member ExecuteSqlWithResults : 
        server:Server * 
        cmd:string -> DataSet 
protected function ExecuteSqlWithResults(
    server : Server, 
    cmd : String
) : DataSet

參數

傳回值

型別:System.Data. . :: . .DataSet
A DataSet system object that contains the results sets returned by the executed Transact-SQL command batch.