Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
'Declaration
Public Function Prepare ( _
command As String, _
commandType As DataCommandType _
) As String
public string Prepare(
string command,
DataCommandType commandType
)
public:
virtual String^ Prepare(
String^ command,
DataCommandType commandType
) sealed
abstract Prepare :
command:string *
commandType:DataCommandType -> string
override Prepare :
command:string *
commandType:DataCommandType -> string
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.
- commandType
Type: Microsoft.VisualStudio.Data.Services.SupportEntities.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.
Return Value
Type: System.String
An identifier of the prepared command that can later be passed to the Execute(String, DataCommandType, array<DataParameter[], Int32) or ExecuteWithoutResults(String, DataCommandType, array<DataParameter[], Int32) method by using the command type Prepared.
Implements
IVsDataCommand.Prepare(String, DataCommandType)
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The command parameter is nulla null reference (Nothing in Visual Basic). |
Remarks
Other exceptions that occur indicate that the preparation failed for a provider-specified reason.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.