准备在数据源中指定的命令执行;命令可执行多次,使用不同的参数。
命名空间: Microsoft.VisualStudio.Data.AdoDotNet
程序集: Microsoft.VisualStudio.Data(在 Microsoft.VisualStudio.Data.dll 中)
语法
声明
Public Overridable Function Prepare ( _
command As String, _
commandType As Integer, _
commandTimeout As Integer _
) As String
public virtual string Prepare(
string command,
int commandType,
int commandTimeout
)
public:
virtual String^ Prepare(
String^ command,
int commandType,
int commandTimeout
)
abstract Prepare :
command:string *
commandType:int *
commandTimeout:int -> string
override Prepare :
command:string *
commandType:int *
commandTimeout:int -> string
public function Prepare(
command : String,
commandType : int,
commandTimeout : int
) : String
参数
- command
类型:System.String
命令的执行做好准备。
- commandType
类型:System.Int32
命令为指定的命令的类型,指定如何解释 command 参数的内容。
- commandTimeout
类型:System.Int32
时间长度,秒,取消模式派生并返回之前阻止客户端调用方。零值指示无限超时;值-1表示一个提供默认值。
返回值
类型:System.String
返回以后可以传递给 Execute 或 ExecuteWithoutResults 方法准备的命令的标识符。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。