LockTimeout Property


public int LockTimeout { get; set; }


Type: System.Int32

Gets or sets the lock timeout of the connection. The lock timeout controls how long the system will wait for unavailable locks before giving up. This is important in deadlock avoidance. The default is 10 seconds.

This property can be changed when the connection is open or closed. If the connection is open, attempting to enable auto commit mode while in the middle of an existing transaction will generate an exception. Changing this property when the connection is closed will cause the next open to use the specified method.

Setting the ConnectionString will override the current value of this property with the auto commit mode specified in the connection string, or by the default if none is specified.

The default is 10 (seconds).


Exception Condition
ArgumentException The value specified is not valid (i.e. less than -1).
RdmException The system failed to set the lock timeout.