Partager via


AdoDotNetConnectionSupport.Prepare(String, Int32, Int32) Method

Definition

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

public:
 virtual System::String ^ Prepare(System::String ^ command, int commandType, int commandTimeout);
public virtual string Prepare (string command, int commandType, int commandTimeout);
abstract member Prepare : string * int * int -> string
override this.Prepare : string * int * int -> string
Public Overridable Function Prepare (command As String, commandType As Integer, commandTimeout As Integer) As String

Parameters

command
String

Command to prepare for execution.

commandType
Int32

Command type for the indicated command, specifying how to interpret the contents of the command parameter.

commandTimeout
Int32

Length of time, in seconds, to block the client before canceling the schema derivation and returning to the caller. A value of zero indicates infinite timeout; value of -1 indicates a provider default.

Returns

Returns an identifier of the prepared command that can later be passed to the Execute(String, Int32, DataParameter[], Int32) or ExecuteWithoutResults(String, Int32, DataParameter[], Int32) methods.

Applies to