Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Executes a specified command, optionally with parameters, and returns results as a DataReader object.
Namespace:  Microsoft.VisualStudio.Data.AdoDotNet
Assembly:  Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)
Syntax
'Declaration
Public Overridable Function Execute ( _
    command As String, _
    commandType As Integer, _
    parameters As DataParameter(), _
    commandTimeout As Integer _
) As DataReader
public virtual DataReader Execute(
    string command,
    int commandType,
    DataParameter[] parameters,
    int commandTimeout
)
public:
virtual DataReader^ Execute(
    String^ command, 
    int commandType, 
    array<DataParameter^>^ parameters, 
    int commandTimeout
)
abstract Execute : 
        command:string * 
        commandType:int * 
        parameters:DataParameter[] * 
        commandTimeout:int -> DataReader  
override Execute : 
        command:string * 
        commandType:int * 
        parameters:DataParameter[] * 
        commandTimeout:int -> DataReader
public function Execute(
    command : String, 
    commandType : int, 
    parameters : DataParameter[], 
    commandTimeout : int
) : DataReader
Parameters
- command 
 Type: System.String- Command to execute that is specific to the data source. 
- commandType 
 Type: System.Int32- Type of the indicated command, specifying how to interpret the contents of the command parameter. 
- parameters 
 Type: array<Microsoft.VisualStudio.Data.DataParameter[]- Array of DataParameter object for the specified command type. 
- commandTimeout 
 Type: System.Int32- Length of time, in seconds, to block the client before canceling the schema derivation and returning to the caller. A value of zero indicates infinite timeout; value of -1 indicates a provider default. 
Return Value
Type: Microsoft.VisualStudio.Data.DataReader
Returns a DataParameter object, which provides a forward-only, read-only stream from the data source.
Remarks
Due to varying orders in which data and parameter values can be returned by a data source, any out or return value parameters specified in the parameters array of DataParameter objects can be retrieved only after the returned DataReader has been closed.
.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.