DataAsyncCommand.AsyncDeriveParameters Method

Derives, in an asynchronous manner, a set of parameters for use with a specified command.

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

Syntax

'宣言
Public Overridable Sub AsyncDeriveParameters ( _
    command As String, _
    commandType As Integer, _
    commandTimeout As Integer, _
    asyncCommandEvents As DataAsyncCommandEvents _
)
'使用
Dim instance As DataAsyncCommand
Dim command As String
Dim commandType As Integer
Dim commandTimeout As Integer
Dim asyncCommandEvents As DataAsyncCommandEvents

instance.AsyncDeriveParameters(command, _
    commandType, commandTimeout, asyncCommandEvents)
public virtual void AsyncDeriveParameters(
    string command,
    int commandType,
    int commandTimeout,
    DataAsyncCommandEvents asyncCommandEvents
)
public:
virtual void AsyncDeriveParameters(
    String^ command, 
    int commandType, 
    int commandTimeout, 
    DataAsyncCommandEvents^ asyncCommandEvents
)
public function AsyncDeriveParameters(
    command : String, 
    commandType : int, 
    commandTimeout : int, 
    asyncCommandEvents : DataAsyncCommandEvents
)

Parameters

  • command
    Type: System.String

    Command for which the parameters are derived.

  • 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 DeriveParameters 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.

注意

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

Permissions

See Also

Reference

DataAsyncCommand Class

DataAsyncCommand Members

Microsoft.VisualStudio.Data Namespace