ConnectionRetryTimeout 属性

指定 SQL Server Compact 3.5 客户端在所建立的连接失败后的多长时间(以秒为单位)之内会继续重新尝试发送请求。

命名空间:  System.Data.SqlServerCe
程序集:  System.Data.SqlServerCe(在 System.Data.SqlServerCe.dll 中)

语法

声明
Public Property ConnectionRetryTimeout As Short
    Get
    Set
用法
Dim instance As SqlCeReplication
Dim value As Short

value = instance.ConnectionRetryTimeout

instance.ConnectionRetryTimeout = value
public short ConnectionRetryTimeout { get; set; }
public:
property short ConnectionRetryTimeout {
    short get ();
    void set (short value);
}
member ConnectionRetryTimeout : int16 with get, set
function get ConnectionRetryTimeout () : short
function set ConnectionRetryTimeout (value : short)

属性值

类型:System. . :: . .Int16
ConnectionRetryTimeout 值,其默认值为 120 秒。

注释

使用 ConnectionRetryTimeout 属性,您可以指定在同步失败后的多长时间之内 SQL Server Compact 3.5 客户端会继续尝试恢复同步。如果在此时段内成功恢复,便继续同步。如果在重新建立连接之前发生连接重试超时,则同步失败。

只有在建立好的连接失败时,才使用 ConnectionRetryTimeout 值。第一次建立连接时,不会使用该值。

由于存在其他网络因素,ConnectionRetryTimeout 设置并不是一个精确值,而只是在放弃同步之前经历的实际时间的近似值。

允许的最大超时为 900 秒。有关设置此超时值的建议,请参阅 SQL Server Compact 3.5 联机丛书中的“优化连接”。

请参阅

参考

SqlCeReplication类

SqlCeReplication 成员

System.Data.SqlServerCe 命名空间