IVsDataCommand.Prepare Method (String, DataCommandType, [], Int32)

When implemented by a class, prepares the specified command on the data source to be executed; the command may then be executed multiple times, with varying parameters.

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

Syntax

'宣言
Function Prepare ( _
    command As String, _
    commandType As DataCommandType, _
    parameters As IVsDataParameter(), _
    commandTimeout As Integer _
) As String
'使用
Dim instance As IVsDataCommand
Dim command As String
Dim commandType As DataCommandType
Dim parameters As IVsDataParameter()
Dim commandTimeout As Integer
Dim returnValue As String

returnValue = instance.Prepare(command, _
    commandType, parameters, commandTimeout)
string Prepare(
    string command,
    DataCommandType commandType,
    IVsDataParameter[] parameters,
    int commandTimeout
)
String^ Prepare(
    String^ command, 
    DataCommandType commandType, 
    array<IVsDataParameter^>^ parameters, 
    int commandTimeout
)
function Prepare(
    command : String, 
    commandType : DataCommandType, 
    parameters : IVsDataParameter[], 
    commandTimeout : int
) : String

Parameters

  • command
    Type: System.String

    A command to execute that is specific to a data source.

  • parameters
    Type: []

    An array of IVsDataParameter objects representing the command parameters.

  • commandTimeout
    Type: System.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 time-out; a value of -1 indicates a provider default.

Return Value

Type: System.String

An identifier of the prepared command that you can later pass to the Execute or ExecuteWithoutResults methods by using the command type Prepared.

Permissions

See Also

Reference

IVsDataCommand Interface

IVsDataCommand Members

Prepare Overload

Microsoft.VisualStudio.Data.Services.SupportEntities Namespace