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