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
'Declaration
Public Function Execute ( _
command As String, _
commandType As DataCommandType _
) As IVsDataReader
public IVsDataReader Execute(
string command,
DataCommandType commandType
)
public:
virtual IVsDataReader^ Execute(
String^ command,
DataCommandType commandType
) sealed
abstract Execute :
command:string *
commandType:DataCommandType -> IVsDataReader
override Execute :
command:string *
commandType:DataCommandType -> IVsDataReader
public final function Execute(
command : String,
commandType : DataCommandType
) : IVsDataReader
Parameters
command
Type: System.StringA command to execute that is specific to a data source.
commandType
Type: Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandTypeThe type of the command that specifies how to interpret the contents of the command parameter. The command type could either be a value from the DataCommandType enumeration or a custom command type defined by a provider, which can be passed in by forcing a cast from an integer to the DataCommandType enumeration.
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 nulla null reference (Nothing in Visual Basic). |
Remarks
Note
Other exceptions that occur indicate that the execution failed for a provider-specified reason.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.