Freigeben über


SessionStateSection.SqlCommandTimeout Eigenschaft

Definition

Dient zum Abrufen oder Festlegen des Timeouts für die SQL-Befehle mithilfe des SQL Server-Sitzungszustandsmodus.

public:
 property TimeSpan SqlCommandTimeout { TimeSpan get(); void set(TimeSpan value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanSecondsOrInfiniteConverter))]
[System.Configuration.ConfigurationProperty("sqlCommandTimeout", DefaultValue="00:00:30")]
public TimeSpan SqlCommandTimeout { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanSecondsOrInfiniteConverter))>]
[<System.Configuration.ConfigurationProperty("sqlCommandTimeout", DefaultValue="00:00:30")>]
member this.SqlCommandTimeout : TimeSpan with get, set
Public Property SqlCommandTimeout As TimeSpan

Eigenschaftswert

Die Zeitspanne in Sekunden, nach der ein SQL-Befehl timeout wird. Der Standardwert ist 30 Sekunden.

Attribute

Beispiele

Im folgenden Codebeispiel wird veranschaulicht, wie die SqlCommandTimeout Eigenschaft abgerufen wird. Weitere Informationen zum Zugreifen auf das SessionStateSection Objekt finden Sie im Codebeispiel im SessionStateSection Klassenthema.

// Display the current SqlCommandTimeout property value.
Console.WriteLine("SqlCommandTimeout: {0}",
  sessionStateSection.SqlCommandTimeout);
' Display the current SqlCommandTimeout property value.
Console.WriteLine("SqlCommandTimeout: {0}", _
  sessionStateSection.SqlCommandTimeout)

Gilt für: