DataCommand.Prepare Method (String, DataCommandType)

Prepares the specified command on the data source to be executed; the command can then be executed multiple times, with varying parameters.

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

Syntax

'宣言
Public Function Prepare ( _
    command As String, _
    commandType As DataCommandType _
) As String
'使用
Dim instance As DataCommand
Dim command As String
Dim commandType As DataCommandType
Dim returnValue As String

returnValue = instance.Prepare(command, _
    commandType)
public string Prepare(
    string command,
    DataCommandType commandType
)
public:
virtual String^ Prepare(
    String^ command, 
    DataCommandType commandType
) sealed
public final function Prepare(
    command : String, 
    commandType : DataCommandType
) : String

Parameters

  • command
    Type: System.String

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

Return Value

Type: System.String

An identifier of the prepared command that can later be passed to the Execute(String, DataCommandType, [], Int32) or ExecuteWithoutResults(String, DataCommandType, [], Int32) method by using the command type Prepared.

Implements

IVsDataCommand.Prepare(String, DataCommandType)

Exceptions

Exception Condition
ArgumentNullException

The command parameter is a null reference (Nothing in Visual Basic).

Remarks

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

Permissions

See Also

Reference

DataCommand Class

DataCommand Members

Prepare Overload

Microsoft.VisualStudio.Data.Framework Namespace

DataCommand