SqlConnectionStringBuilder.ConnectRetryCount Property

Definition

在确定有一个空闲的连接失败之后尝试重新连接的次数。The number of reconnections attempted after identifying that there was an idle connection failure. 该值必须是介于 0 和 255 之间的整数。This must be an integer between 0 and 255. 默认值为 1。Default is 1. 设置为 0 将禁止在空闲连接失败时重新连接。Set to 0 to disable reconnecting on idle connection failures. 如果设置的值超过允许的范围,则将引发 ArgumentExceptionAn ArgumentException will be thrown if set to a value outside of the allowed range.

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

Property Value

Int32

在确定有一个空闲的连接失败之后尝试重新连接的次数。The number of reconnections attempted after identifying that there was an idle connection failure.

Applies to