DataCommand.Execute Method (String, DataCommandType)

Executes a specified command and returns read-only results.

Namespace:  Microsoft.VisualStudio.Data.Framework
Assembly:  Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)

Syntax

'宣言
Public Function Execute ( _
    command As String, _
    commandType As DataCommandType _
) As IVsDataReader
'使用
Dim instance As DataCommand
Dim command As String
Dim commandType As DataCommandType
Dim returnValue As IVsDataReader

returnValue = instance.Execute(command, _
    commandType)
public IVsDataReader Execute(
    string command,
    DataCommandType commandType
)
public:
virtual IVsDataReader^ Execute(
    String^ command, 
    DataCommandType commandType
) sealed
public final function Execute(
    command : String, 
    commandType : DataCommandType
) : IVsDataReader

Parameters

  • command
    Type: System.String

    A command to execute that is specific to a data source.

Return Value

Type: Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReader

An IVsDataReader object, which provides a forward-only, read-only stream from the data source.

Implements

IVsDataCommand.Execute(String, DataCommandType)

Exceptions

Exception Condition
ArgumentNullException

The command parameter is a null reference (Nothing in Visual Basic).

Remarks

注意

Other exceptions that occur indicate that the execution failed for a provider-specified reason.

Permissions

See Also

Reference

DataCommand Class

DataCommand Members

Execute Overload

Microsoft.VisualStudio.Data.Framework Namespace

DataCommandType

ExecuteWithoutResults(String, DataCommandType, [], Int32)