Export (0) Print
Expand All

ServerConnection.StatementTimeout Property

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

Namespace:  Microsoft.SqlServer.Management.Common
Assembly:  Microsoft.SqlServer.ConnectionInfo (in Microsoft.SqlServer.ConnectionInfo.dll)

public int StatementTimeout { get; set; }

Property Value

Type: 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

Community Additions

ADD
Show:
© 2015 Microsoft