다음을 통해 공유


SessionStateSection.SqlCommandTimeout 속성

정의

SQL Server 세션 상태 모드를 사용하여 SQL 명령에 대한 기간 제한 시간을 가져오거나 설정합니다.

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

속성 값

SQL 명령이 시간 초과되는 시간(초)입니다. 기본값은 30초입니다.

특성

예제

다음 코드 예제에서는 속성을 가져오는 방법을 보여 줍니다 SqlCommandTimeout . 개체에 액세스하는 방법을 알아보려면 클래스 항목의 SessionStateSection 코드 예제를 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)

적용 대상