AdoDotNetConnectionSupport.GetCommand 方法

构造从特定命令字符串的一 DbCommand 对象。

命名空间:  Microsoft.VisualStudio.Data.Framework.AdoDotNet
程序集:  Microsoft.VisualStudio.Data.Framework(在 Microsoft.VisualStudio.Data.Framework.dll 中)

语法

声明
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

参数

  • command
    类型:System.String
    执行顺序是特定于数据源。
  • commandTimeout
    类型:System.Int32
    时间长度,秒,取消模式派生并返回之前阻止客户端调用方。零值指示无限超时;值-1表示一个提供默认值。

返回值

类型:System.Data.Common.DbCommand
DbCommand 对象实例。

.NET Framework 安全性

请参见

参考

AdoDotNetConnectionSupport 类

Microsoft.VisualStudio.Data.Framework.AdoDotNet 命名空间

DataCommandType