SessionStateSection.SqlCommandTimeout Propriedade

Definição

Obtém ou define o tempo de espera para os comandos SQL usando o modo de estado de sessão do SQL Server.

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

Valor de Propriedade

A quantidade de tempo, em segundos, após o qual um comando SQL expira. O padrão é 30 segundos.

Atributos

Exemplos

O exemplo de código seguinte demonstra como obter a SqlCommandTimeout propriedade. Consulte o exemplo de código no SessionStateSection tópico da aula para aprender como aceder ao SessionStateSection objeto.

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

Aplica-se a