SessionStateSection.SqlCommandTimeout Tulajdonság
Definíció
Fontos
Egyes információk olyan, kiadás előtti termékekre vonatkoznak, amelyek a kiadásig még jelentősen módosulhatnak. A Microsoft nem vállal kifejezett vagy törvényi garanciát az itt megjelenő információért.
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)