Partager via


DataAsyncCommand.DeriveSchemaAsync Method

Derives, in an asynchronous manner, the schema of the specified command.

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

Syntax

'Declaration
Public Sub DeriveSchemaAsync ( _
    command As String, _
    commandType As DataCommandType, _
    parameters As IVsDataParameter(), _
    commandTimeout As Integer, _
    userState As Object _
)
public void DeriveSchemaAsync(
    string command,
    DataCommandType commandType,
    IVsDataParameter[] parameters,
    int commandTimeout,
    Object userState
)
public:
virtual void DeriveSchemaAsync(
    String^ command, 
    DataCommandType commandType, 
    array<IVsDataParameter^>^ parameters, 
    int commandTimeout, 
    Object^ userState
) sealed
abstract DeriveSchemaAsync : 
        command:string * 
        commandType:DataCommandType * 
        parameters:IVsDataParameter[] * 
        commandTimeout:int * 
        userState:Object -> unit  
override DeriveSchemaAsync : 
        command:string * 
        commandType:DataCommandType * 
        parameters:IVsDataParameter[] * 
        commandTimeout:int * 
        userState:Object -> unit
public final function DeriveSchemaAsync(
    command : String, 
    commandType : DataCommandType, 
    parameters : IVsDataParameter[], 
    commandTimeout : int, 
    userState : Object
)

Parameters

  • command
    Type: System.String

    The command for which the schema is derived.

  • commandTimeout
    Type: System.Int32

    Amount of time, in seconds, before which the command times out.

  • userState
    Type: System.Object

    The object on which this method calls back as the command progresses.

Implements

IVsDataAsyncCommand.DeriveSchemaAsync(String, DataCommandType, array<IVsDataParameter[], Int32, Object)

Exceptions

Exception Condition
ArgumentNullException

The command or userState parameter is nulla null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

The commandTimeout parameter is less than -1.

Remarks

This method performs the same operation as the DeriveSchema 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.

The userState parameter uniquely identifies the specific asynchronous operation and is passed back as part of the event arguments for the DeriveSchemaCompleted event so that a listener can determine which asynchronous process completed.

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.Framework Namespace

DataCommand