Share via


DataAsyncCommand.AsyncExecute Method

Executes a command in an asynchronous manner.

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

Syntax

'Declaration
Public Overridable Sub AsyncExecute ( _
    command As String, _
    commandType As Integer, _
    parameters As DataParameter(), _
    commandTimeout As Integer, _
    asyncCommandEvents As DataAsyncCommandEvents _
)
public virtual void AsyncExecute(
    string command,
    int commandType,
    DataParameter[] parameters,
    int commandTimeout,
    DataAsyncCommandEvents asyncCommandEvents
)
public:
virtual void AsyncExecute(
    String^ command, 
    int commandType, 
    array<DataParameter^>^ parameters, 
    int commandTimeout, 
    DataAsyncCommandEvents^ asyncCommandEvents
)
abstract AsyncExecute : 
        command:string * 
        commandType:int * 
        parameters:DataParameter[] * 
        commandTimeout:int * 
        asyncCommandEvents:DataAsyncCommandEvents -> unit 
override AsyncExecute : 
        command:string * 
        commandType:int * 
        parameters:DataParameter[] * 
        commandTimeout:int * 
        asyncCommandEvents:DataAsyncCommandEvents -> unit 
public function AsyncExecute(
    command : String, 
    commandType : int, 
    parameters : DataParameter[], 
    commandTimeout : int, 
    asyncCommandEvents : DataAsyncCommandEvents
)

Parameters

  • commandType
    Type: System.Int32
    Format of the command string.
  • commandTimeout
    Type: System.Int32
    Amount of time, in seconds, before which the command times out.

Exceptions

Exception Condition
ArgumentNullException

The command or asyncCommandEvents are null.

ArgumentException

The commandType specifies an invalid type.

ArgumentOutOfRangeException

The commandTimeout is less than -1.

NotSupportedException

The provider does not support this method.

Remarks

This method performs the same operation as the Execute method, but in an asynchronous manner.

If the value of the commandTimeout parameter is 0, there is no timeout (or, timeout is infinite); if the value is -1, the timeout period is that set by the data provider.

Note

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

.NET Framework Security

See Also

Reference

DataAsyncCommand Class

Microsoft.VisualStudio.Data Namespace

DataCommand