SqlDependency.AddCommandDependency(SqlCommand) 메서드

정의

SqlCommand 개체를 이 SqlDependency 인스턴스와 연결합니다.

public:
 void AddCommandDependency(System::Data::SqlClient::SqlCommand ^ command);
public void AddCommandDependency (System.Data.SqlClient.SqlCommand command);
member this.AddCommandDependency : System.Data.SqlClient.SqlCommand -> unit
Public Sub AddCommandDependency (command As SqlCommand)

매개 변수

command
SqlCommand

알림에 유효한 문을 포함하는 SqlCommand 개체입니다.

예외

command 매개 변수가 null인 경우

SqlCommand 개체의 SqlNotificationRequest 속성에 Notification 개체가 이미 할당되어 있고 해당 SqlNotificationRequest가 이 종속성과 연결되지 않은 경우

설명

쿼리 알림은 특정 요구 사항 목록을 충족하는 SELECT 문에 대해서만 지원됩니다. 자세한 내용은 SQL Server Service Broker쿼리 알림 작업을 참조하세요.

적용 대상

추가 정보