SqlDependency 생성자
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
클래스의 새 인스턴스를 SqlDependency 만듭니다.
오버로드
| Name | Description |
|---|---|
| SqlDependency() |
기본 설정을 사용하여 클래스의 SqlDependency 새 인스턴스를 만듭니다. |
| SqlDependency(SqlCommand) |
클래스의 새 인스턴스를 SqlDependency 만들고 매개 변수와 SqlCommand 연결합니다. |
| SqlDependency(SqlCommand, String, Int32) |
클래스의 새 인스턴스를 SqlDependency 만들고, 매개 변수와 SqlCommand 연결하고, 알림 옵션 및 제한 시간 값을 지정합니다. |
SqlDependency()
기본 설정을 사용하여 클래스의 SqlDependency 새 인스턴스를 만듭니다.
public:
SqlDependency();
public SqlDependency();
Public Sub New ()
설명
생성자는 기본 Service Broker 서비스 이름 및 시간 초과를 사용하여 개체를 초기화 SqlDependency 합니다. 생성 후 특정 시점에서 메서드를 AddCommandDependency 사용하여 하나 이상의 명령을 이 SqlDependency 개체에 연결해야 합니다.
쿼리 알림은 특정 요구 사항 목록을 충족하는 SELECT 문에 대해서만 지원됩니다. 자세한 내용은 SQL Server Service Broker 및 쿼리 알림 작업 참조하세요.
추가 정보
적용 대상
SqlDependency(SqlCommand)
클래스의 새 인스턴스를 SqlDependency 만들고 매개 변수와 SqlCommand 연결합니다.
public:
SqlDependency(System::Data::SqlClient::SqlCommand ^ command);
public SqlDependency(System.Data.SqlClient.SqlCommand command);
new System.Data.SqlClient.SqlDependency : System.Data.SqlClient.SqlCommand -> System.Data.SqlClient.SqlDependency
Public Sub New (command As SqlCommand)
매개 변수
- command
- SqlCommand
SqlCommand 이 SqlDependency 개체와 연결할 개체입니다. 생성자는 개체를 SqlNotificationRequest 설정하고 명령에 바인딩합니다.
예외
매개 변수가 command NULL입니다.
개체의 SqlCommand 속성에 SqlNotificationRequestNotification 할당된 개체가 SqlNotificationRequest 이미 있으며 이 종속성과는 관련이 없습니다.
설명
내부적으로 이 생성자는 클래스의 인스턴스를 SqlNotificationRequest 만들고 개체에 SqlCommand 바인딩합니다.
쿼리 알림은 특정 요구 사항 목록을 충족하는 SELECT 문에 대해서만 지원됩니다. 자세한 내용은 SQL Server Service Broker 및 쿼리 알림 작업 참조하세요.
추가 정보
적용 대상
SqlDependency(SqlCommand, String, Int32)
클래스의 새 인스턴스를 SqlDependency 만들고, 매개 변수와 SqlCommand 연결하고, 알림 옵션 및 제한 시간 값을 지정합니다.
public:
SqlDependency(System::Data::SqlClient::SqlCommand ^ command, System::String ^ options, int timeout);
public SqlDependency(System.Data.SqlClient.SqlCommand command, string options, int timeout);
new System.Data.SqlClient.SqlDependency : System.Data.SqlClient.SqlCommand * string * int -> System.Data.SqlClient.SqlDependency
Public Sub New (command As SqlCommand, options As String, timeout As Integer)
매개 변수
- command
- SqlCommand
SqlCommand 이 SqlDependency 개체와 연결할 개체입니다. 생성자는 개체를 SqlNotificationRequest 설정하고 명령에 바인딩합니다.
- options
- String
이 종속성에서 사용할 알림 요청 옵션입니다.
null 기본 서비스를 사용합니다.
- timeout
- Int32
이 알림의 제한 시간(초)입니다. 기본값은 0으로, 서버의 제한 시간을 사용해야 함을 나타냅니다.
예외
매개 변수가 command NULL입니다.
제한 시간 값이 0보다 작습니다.
개체의 SqlCommand 속성에 SqlNotificationRequestNotification 할당된 개체가 SqlNotificationRequest 이미 있으며 이 종속성과는 관련이 없습니다.
SQLCLR 내에서 SqlDependency 인스턴스를 만들려고 했습니다.
설명
쿼리 알림은 특정 요구 사항 목록을 충족하는 SELECT 문에 대해서만 지원됩니다. 자세한 내용은 SQL Server Service Broker 및 쿼리 알림 작업 참조하세요.