构造从特定命令字符串的一 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
执行顺序是特定于数据源。
- commandType
类型:Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandType
指定的命令的类型,指定如何解释 command 参数的内容。
- parameters
类型:array<Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataParameter[]
数组中指定的命令类型的 IVsDataParameter 对象。
- commandTimeout
类型:System.Int32
时间长度,秒,取消模式派生并返回之前阻止客户端调用方。零值指示无限超时;值-1表示一个提供默认值。
返回值
类型:System.Data.Common.DbCommand
DbCommand 对象实例。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。