Поделиться через


Свойство ServerConnection.StatementTimeout

Gets or sets the number of seconds a statement is given to run before failing with a time-out error.

Пространство имен:  Microsoft.SqlServer.Management.Common
Сборка:  Microsoft.SqlServer.ConnectionInfo (в Microsoft.SqlServer.ConnectionInfo.dll)

Синтаксис

'Декларация
Public Property StatementTimeout As Integer 
    Get 
    Set
'Применение
Dim instance As ServerConnection 
Dim value As Integer 

value = instance.StatementTimeout

instance.StatementTimeout = value
public int StatementTimeout { get; set; }
public:
property int StatementTimeout {
    int get ();
    void set (int value);
}
member StatementTimeout : int with get, set
function get StatementTimeout () : int 
function set StatementTimeout (value : int)

Значение свойства

Тип: System.Int32
An Int32 value that specifies the number of seconds a statement is given to run before failing with a time-out error.

Примеры

C#

ServerConnection conn = new ServerConnection();
Console.WriteLine(conn.StatementTimeout);

PowerShell

$conn = new-object Microsoft.SqlServer.Management.Common.ServerConnection
Write-Host $conn.StatementTimeout

См. также

Справочник

ServerConnection Класс

Пространство имен Microsoft.SqlServer.Management.Common