SessionStateSection.SqlCommandTimeout Tulajdonság

Definíció

Lekéri vagy beállítja az SQL-parancsok időtartamának időtúllépését a SQL Server munkamenet-állapot mód használatával.

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

Tulajdonság értéke

Az az idő másodpercben, amely után egy SQL-parancs időtúllépést fog végrehajtani. Az alapértelmezett érték 30 másodperc.

Attribútumok

Példák

Az alábbi példakód bemutatja, hogyan szerezheti be a tulajdonságot SqlCommandTimeout . Az objektum elérésének megismeréséhez tekintse meg az SessionStateSection osztálytéma kód példáját SessionStateSection .

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

A következőre érvényes: