Compartir a través de


DataCommand.ExecuteWithoutResults Method

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
Assembly:  Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)

Syntax

'Declaración
Public Overridable Function ExecuteWithoutResults ( _
    command As String, _
    commandType As Integer, _
    parameters As DataParameter(), _
    commandTimeout As Integer _
) As Integer
public virtual int ExecuteWithoutResults(
    string command,
    int commandType,
    DataParameter[] parameters,
    int commandTimeout
)
public:
virtual int ExecuteWithoutResults(
    String^ command, 
    int commandType, 
    array<DataParameter^>^ parameters, 
    int commandTimeout
)
abstract ExecuteWithoutResults : 
        command:string * 
        commandType:int * 
        parameters:DataParameter[] * 
        commandTimeout:int -> int 
override ExecuteWithoutResults : 
        command:string * 
        commandType:int * 
        parameters:DataParameter[] * 
        commandTimeout:int -> int 
public function ExecuteWithoutResults(
    command : String, 
    commandType : int, 
    parameters : DataParameter[], 
    commandTimeout : int
) : int

Parameters

  • command
    Type: System.String
    A command to execute that is specific to a data source.
  • commandType
    Type: System.Int32
    The command type for the indicated command, specifying how to interpret the contents of the command parameter.
  • 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 timeout; a value of -1 indicates a provider default.

Return Value

Type: System.Int32
Returns a DDEX provider specific integer status code.

Exceptions

Exception Condition
ArgumentNullException

The command or asyncCommandEvents are null.

ArgumentException

The commandType specifies an invalid type.

ArgumentOutOfRangeException

The commandTimeout is less than -1.

NotSupportedException

The provider does not support this method.

Remarks

In most cases, the outcome of the call to this method will be an indication of the number of rows affected.

Out and return value parameters may still be set using this call. They are not considered part of results.

Nota

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

.NET Framework Security

See Also

Reference

DataCommand Class

Microsoft.VisualStudio.Data Namespace

DataCommandType