Compartir a través de


AdoDotNetConnectionSupport.GetCommand Method

Constructs a DbCommand object from the given command string.

Namespace:  Microsoft.VisualStudio.Data.Framework.AdoDotNet
Assembly:  Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)

Syntax

'Declaración
Protected Overridable Function GetCommand ( _
    command As String, _
    commandType As DataCommandType, _
    parameters As IVsDataParameter(), _
    commandTimeout As Integer _
) As DbCommand
protected virtual DbCommand GetCommand(
    string command,
    DataCommandType commandType,
    IVsDataParameter[] parameters,
    int commandTimeout
)
protected:
virtual DbCommand^ GetCommand(
    String^ command, 
    DataCommandType commandType, 
    array<IVsDataParameter^>^ parameters, 
    int commandTimeout
)
abstract GetCommand : 
        command:string * 
        commandType:DataCommandType * 
        parameters:IVsDataParameter[] * 
        commandTimeout:int -> DbCommand 
override GetCommand : 
        command:string * 
        commandType:DataCommandType * 
        parameters:IVsDataParameter[] * 
        commandTimeout:int -> DbCommand 
protected function GetCommand(
    command : String, 
    commandType : DataCommandType, 
    parameters : IVsDataParameter[], 
    commandTimeout : int
) : DbCommand

Parameters

  • command
    Type: System.String
    Command to execute that is specific to the data source.
  • commandTimeout
    Type: System.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 time-out; a value of -1 indicates a provider default.

Return Value

Type: System.Data.Common.DbCommand
A DbCommand object instance.

.NET Framework Security

See Also

Reference

AdoDotNetConnectionSupport Class

Microsoft.VisualStudio.Data.Framework.AdoDotNet Namespace

DataCommandType