Condividi tramite


DataCommand.Execute Method

Definition

Overloads

Execute(String, DataCommandType, IVsDataParameter[], Int32)

Executes a specified command, optionally with parameters, and returns read-only results.

Execute(String, DataCommandType, IVsDataParameter[])

Executes a specified command, optionally with parameters, and returns read-only results.

Execute(String)

Executes a specified command and returns read-only results.

Execute(String, DataCommandType)

Executes a specified command and returns read-only results.

Execute(String, DataCommandType, IVsDataParameter[], Int32)

Executes a specified command, optionally with parameters, and returns read-only results.

public:
 virtual Microsoft::VisualStudio::Data::Services::SupportEntities::IVsDataReader ^ Execute(System::String ^ command, Microsoft::VisualStudio::Data::Services::SupportEntities::DataCommandType commandType, cli::array <Microsoft::VisualStudio::Data::Services::SupportEntities::IVsDataParameter ^> ^ parameters, int commandTimeout);
public virtual Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReader Execute (string command, Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType commandType, Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataParameter[] parameters, int commandTimeout);
abstract member Execute : string * Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType * Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataParameter[] * int -> Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReader
override this.Execute : string * Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType * Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataParameter[] * int -> Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReader
Public Overridable Function Execute (command As String, commandType As DataCommandType, parameters As IVsDataParameter(), commandTimeout As Integer) As IVsDataReader

Parameters

command
String

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

commandType
DataCommandType

The 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.

parameters
IVsDataParameter[]

An array of IVsDataParameter objects representing the command parameters for the specified command type.

commandTimeout
Int32

The length of time, in seconds, to block the client before canceling the execution and returning to the caller. A value of 0 indicates infinite time-out; a value of -1 indicates a provider default.

Returns

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

Implements

Exceptions

The command parameter is null.

The commandTimeout parameter is less than -1.

Applies to

Execute(String, DataCommandType, IVsDataParameter[])

Executes a specified command, optionally with parameters, and returns read-only results.

public:
 virtual Microsoft::VisualStudio::Data::Services::SupportEntities::IVsDataReader ^ Execute(System::String ^ command, Microsoft::VisualStudio::Data::Services::SupportEntities::DataCommandType commandType, cli::array <Microsoft::VisualStudio::Data::Services::SupportEntities::IVsDataParameter ^> ^ parameters);
public Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReader Execute (string command, Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType commandType, Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataParameter[] parameters);
abstract member Execute : string * Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType * Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataParameter[] -> Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReader
override this.Execute : string * Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType * Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataParameter[] -> Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReader
Public Function Execute (command As String, commandType As DataCommandType, parameters As IVsDataParameter()) As IVsDataReader

Parameters

command
String

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

commandType
DataCommandType

The 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.

parameters
IVsDataParameter[]

An array of IVsDataParameter objects representing the command parameters for the specified command type.

Returns

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

Implements

Exceptions

The command parameter is null.

Applies to

Execute(String)

Executes a specified command and returns read-only results.

public:
 virtual Microsoft::VisualStudio::Data::Services::SupportEntities::IVsDataReader ^ Execute(System::String ^ command);
public Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReader Execute (string command);
abstract member Execute : string -> Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReader
override this.Execute : string -> Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReader
Public Function Execute (command As String) As IVsDataReader

Parameters

command
String

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

Returns

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

Implements

Exceptions

The command parameter is null.

Applies to

Execute(String, DataCommandType)

Executes a specified command and returns read-only results.

public:
 virtual Microsoft::VisualStudio::Data::Services::SupportEntities::IVsDataReader ^ Execute(System::String ^ command, Microsoft::VisualStudio::Data::Services::SupportEntities::DataCommandType commandType);
public Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReader Execute (string command, Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType commandType);
abstract member Execute : string * Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType -> Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReader
override this.Execute : string * Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType -> Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReader
Public Function Execute (command As String, commandType As DataCommandType) As IVsDataReader

Parameters

command
String

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

commandType
DataCommandType

The 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.

Returns

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

Implements

Exceptions

The command parameter is null.

Applies to