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 秒。