DbCommand.CommandTimeout DbCommand.CommandTimeout DbCommand.CommandTimeout DbCommand.CommandTimeout Property

定义

获取或设置在终止尝试执行命令并生成错误之前的等待时间。Gets or sets the wait time before terminating the attempt to execute a command and generating an error.

public:
 abstract property int CommandTimeout { int get(); void set(int value); };
public abstract int CommandTimeout { get; set; }
member this.CommandTimeout : int with get, set
Public MustOverride Property CommandTimeout As Integer

属性值

等待命令执行所需的时间(以秒为单位)。The time in seconds to wait for the command to execute.

实现

注解

ArgumentException如果生成已分配CommandTimeout属性值小于 0。An ArgumentException is generated if the assigned CommandTimeout property value is less than 0.

请为实施者,注意建议 0 表示无超时。Note to implementers, it is recommended that 0 means no timeout.

适用于

另请参阅