DbCommand.Cancel DbCommand.Cancel DbCommand.Cancel DbCommand.Cancel Method

定义

尝试取消 DbCommand 的执行。Attempts to cancels the execution of a DbCommand.

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

实现

注解

如果没有任何要取消,没有任何反应。If there is nothing to cancel, nothing happens. 但是,如果有正在执行的命令,则即使取消尝试失败,也不会生成异常。However, if there is a command in process, and the attempt to cancel fails, no exception is generated.

适用于

另请参阅