DbCommand.Prepare DbCommand.Prepare DbCommand.Prepare DbCommand.Prepare Method

定义

在数据源上创建准备就绪(或已编译)的命令版本。Creates a prepared (or compiled) version of the command on the data source.

public:
 abstract void Prepare();
public abstract void Prepare ();
abstract member Prepare : unit -> unit
Public MustOverride Sub Prepare ()

实现

注解

如果CommandType属性设置为TableDirectPrepare不执行任何操作。If the CommandType property is set to TableDirect, Prepare does nothing. 如果CommandType设置为StoredProcedure,在调用Prepare应该会成功,虽然它可能会不导致执行任何操作。If CommandType is set to StoredProcedure, the call to Prepare should succeed, although it may result in a no-op.

适用于

另请参阅