共用方式為


ConnectionContext.CommandTimeout 屬性

取得或設定執行批次陳述式的命令逾時之前經過的時間 (以秒為單位)。

命名空間:  Microsoft.Data.Schema.UnitTesting
組件:  Microsoft.Data.Schema.UnitTesting (在 Microsoft.Data.Schema.UnitTesting.dll 中)

語法

'宣告
Public Property CommandTimeout As Integer
    Get
    Set
public int CommandTimeout { get; set; }
public:
property int CommandTimeout {
    int get ();
    void set (int value);
}
member CommandTimeout : int with get, set
function get CommandTimeout () : int
function set CommandTimeout (value : int)

屬性值

型別:System.Int32
逾時前的秒數。預設為 30。

備註

使用此屬性來配置DbCommand,用來執行Transact-SQL語句。

.NET Framework 安全性

請參閱

參考

ConnectionContext 類別

Microsoft.Data.Schema.UnitTesting 命名空間

DbCommand