IDbConnection.ConnectionTimeout 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在尝试建立连接时有时间等待,然后终止尝试并产生错误。
public:
property int ConnectionTimeout { int get(); };
public int ConnectionTimeout { get; }
member this.ConnectionTimeout : int
Public ReadOnly Property ConnectionTimeout As Integer
属性值
等待的时刻。
注解
值 0 表示等待时间无限制,而非无等待时间,应避免在 中 ConnectionString 使用,因为这会导致连接无限期等待。
属性值
等待连接打开的时间(以秒为单位)。 默认值为 15 秒。