DataCommand.ExecuteWithoutResults Method (String, DataCommandType, array<IVsDataParameter , Int32)
Executes a command, optionally with parameters, but does not request results, instead returning an integer indicating the outcome of the call.
Namespace: Microsoft.VisualStudio.Data.Framework
Assembly: Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)
Syntax
'Declaración
Public Overridable Function ExecuteWithoutResults ( _
command As String, _
commandType As DataCommandType, _
parameters As IVsDataParameter(), _
commandTimeout As Integer _
) As Integer
public virtual int ExecuteWithoutResults(
string command,
DataCommandType commandType,
IVsDataParameter[] parameters,
int commandTimeout
)
public:
virtual int ExecuteWithoutResults(
String^ command,
DataCommandType commandType,
array<IVsDataParameter^>^ parameters,
int commandTimeout
)
abstract ExecuteWithoutResults :
command:string *
commandType:DataCommandType *
parameters:IVsDataParameter[] *
commandTimeout:int -> int
override ExecuteWithoutResults :
command:string *
commandType:DataCommandType *
parameters:IVsDataParameter[] *
commandTimeout:int -> int
public function ExecuteWithoutResults(
command : String,
commandType : DataCommandType,
parameters : IVsDataParameter[],
commandTimeout : int
) : int
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.
- parameters
Type: array<Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataParameter[]
An array of IVsDataParameter objects representing the command parameters for the specified command type.
- 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.Int32
A DDEX provider–specific integer status code.
Implements
IVsDataCommand.ExecuteWithoutResults(String, DataCommandType, array<IVsDataParameter[], Int32)
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The command parameter is nulla null reference (Nothing in Visual Basic). |
ArgumentOutOfRangeException | The commandTimeout parameter is less than -1. |
Remarks
In many cases, the outcome of the call to this method will indicate the number of rows affected.
You can still set out and return value parameters by using this call. They are not considered part of the results.
Nota
Other exceptions that occur indicate that the execution 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.