DataCommand.Execute(String, Int32, DataParameter[], Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Executes a specified command, optionally with parameters, and returns read-only results.
public:
virtual Microsoft::VisualStudio::Data::DataReader ^ Execute(System::String ^ command, int commandType, cli::array <Microsoft::VisualStudio::Data::DataParameter ^> ^ parameters, int commandTimeout);
public virtual Microsoft.VisualStudio.Data.DataReader Execute (string command, int commandType, Microsoft.VisualStudio.Data.DataParameter[] parameters, int commandTimeout);
abstract member Execute : string * int * Microsoft.VisualStudio.Data.DataParameter[] * int -> Microsoft.VisualStudio.Data.DataReader
override this.Execute : string * int * Microsoft.VisualStudio.Data.DataParameter[] * int -> Microsoft.VisualStudio.Data.DataReader
Public Overridable Function Execute (command As String, commandType As Integer, parameters As DataParameter(), commandTimeout As Integer) As DataReader
Parameters
- command
- String
A command to execute that is specific to a data source.
- commandType
- Int32
The command type for the indicated command, specifying how to interpret the contents of the command
parameter.
- parameters
- DataParameter[]
An array of DataParameter objects for the specified command type. While this is an input parameter, the DDEX provider is still able to set properties on individual out and return value parameters.
- 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 timeout; a value of -1 indicates a provider default.
Returns
Returns a DataReader object, which provides a forward-only, read-only stream from the data source.
Exceptions
The command or asyncCommandEvents are null.
The commandType specifies an invalid type.
The commandTimeout is less than -1.
The provider does not support this method.