Freigeben über


DataCommand.Prepare Method

Definition

Overloads

Prepare(String, DataCommandType, IVsDataParameter[])

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

Prepare(String)

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

Prepare(String, DataCommandType)

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

Prepare(String, DataCommandType, IVsDataParameter[], Int32)

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

Prepare(String, DataCommandType, IVsDataParameter[])

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

public:
 virtual System::String ^ Prepare(System::String ^ command, Microsoft::VisualStudio::Data::Services::SupportEntities::DataCommandType commandType, cli::array <Microsoft::VisualStudio::Data::Services::SupportEntities::IVsDataParameter ^> ^ parameters);
public string Prepare (string command, Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType commandType, Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataParameter[] parameters);
abstract member Prepare : string * Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType * Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataParameter[] -> string
override this.Prepare : string * Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType * Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataParameter[] -> string
Public Function Prepare (command As String, commandType As DataCommandType, parameters As IVsDataParameter()) As String

Parameters

command
String

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

commandType
DataCommandType

The type of the command that specifies how to interpret the contents of the command parameter. The command type could either be a value from the DataCommandType enumeration or a custom command type defined by a provider, which can be passed in by forcing a cast from an integer to the DataCommandType enumeration.

parameters
IVsDataParameter[]

An array of IVsDataParameter objects representing the command parameters for the specified command type.

Returns

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

Implements

Exceptions

The command parameter is null.

The commandTimeout parameter is less than -1.

Applies to

Prepare(String)

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

public:
 virtual System::String ^ Prepare(System::String ^ command);
public string Prepare (string command);
abstract member Prepare : string -> string
override this.Prepare : string -> string
Public Function Prepare (command As String) As String

Parameters

command
String

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

Returns

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

Implements

Exceptions

The command parameter is null.

Applies to

Prepare(String, DataCommandType)

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

public:
 virtual System::String ^ Prepare(System::String ^ command, Microsoft::VisualStudio::Data::Services::SupportEntities::DataCommandType commandType);
public string Prepare (string command, Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType commandType);
abstract member Prepare : string * Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType -> string
override this.Prepare : string * Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType -> string
Public Function Prepare (command As String, commandType As DataCommandType) As String

Parameters

command
String

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

commandType
DataCommandType

The type of the command that specifies how to interpret the contents of the command parameter. The command type could either be a value from the DataCommandType enumeration or a custom command type defined by a provider, which can be passed in by forcing a cast from an integer to the DataCommandType enumeration.

Returns

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

Implements

Exceptions

The command parameter is null.

Applies to

Prepare(String, DataCommandType, IVsDataParameter[], Int32)

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

public:
 virtual System::String ^ Prepare(System::String ^ command, Microsoft::VisualStudio::Data::Services::SupportEntities::DataCommandType commandType, cli::array <Microsoft::VisualStudio::Data::Services::SupportEntities::IVsDataParameter ^> ^ parameters, int commandTimeout);
public virtual string Prepare (string command, Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType commandType, Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataParameter[] parameters, int commandTimeout);
abstract member Prepare : string * Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType * Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataParameter[] * int -> string
override this.Prepare : string * Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType * Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataParameter[] * int -> string
Public Overridable Function Prepare (command As String, commandType As DataCommandType, parameters As IVsDataParameter(), commandTimeout As Integer) As String

Parameters

command
String

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

commandType
DataCommandType

The type of the command that specifies how to interpret the contents of the command parameter. The command type could either be a value from the DataCommandType enumeration or a custom command type defined by a provider, which can be passed in by forcing a cast from an integer to the DataCommandType enumeration.

parameters
IVsDataParameter[]

An array of IVsDataParameter objects representing the command parameters for the specified command type.

commandTimeout
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.

Returns

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

Implements

Exceptions

The command parameter is null.

The commandTimeout parameter is less than -1.

Applies to