SubscriptionConditionEventRule.EventClassName Property
SubscriptionConditionEventRule に関連付けられた EventClass の名前を取得または設定します。
名前空間: Microsoft.SqlServer.Management.Nmo
アセンブリ: Microsoft.SqlServer.Smo (microsoft.sqlserver.smo.dll 内)
構文
'宣言
Public Property EventClassName As String
public string EventClassName { get; set; }
public:
property String^ EventClassName {
String^ get ();
void set (String^ value);
}
/** @property */
public String get_EventClassName ()
/** @property */
public void set_EventClassName (String value)
public function get EventClassName () : String
public function set EventClassName (value : String)
プロパティ値
関連付けられたイベント クラスの名前を示す String です。
解説
ルールは、指定されたイベント クラスのイベントに対してのみ実行されます。
使用例
次の例は、条件ベースのイベント ドリブン サブスクリプション ルールを定義してサブスクリプション クラスに追加する方法を示しています。
// Add a rule to generate condition-based, event notifications
SubscriptionConditionEventRule flightConditionEventRule =
new SubscriptionConditionEventRule(
flightSubscriptions, "FlightConditionEventRule");
flightConditionEventRule.EventClassName = "FlightEvents";
flightConditionEventRule.ActionTimeout = new TimeSpan(0, 2, 0);
flightConditionEventRule.SqlLoginName = "MyLowPrivLogin";
flightConditionEventRule.SqlUserName = "MyLowPrivUser";
flightConditionEventRule.InputTypeName = "FlightEvents";
flightConditionEventRule.InputTypeSchema = "MyAppSchema";
flightConditionEventRule.SqlExpression =
"INSERT INTO MyAppSchema.FlightNotifications (SubscriberId, " +
"DeviceName, SubscriberLocale, LeavingFrom, GoingTo, Price) " +
"SELECT [Subscription.SubscriberId], [Subscription.DeviceName], " +
"[Subscription.SubscriberLocale], " +
"[Input.LeavingFrom], [Input.GoingTo], [Input.Price] " +
"FROM MyAppSchema.FlightConditionEventRule;";
flightSubscriptions.SubscriptionConditionEventRules.Add(
flightConditionEventRule);
' Add a rule to generate condition-based, event notifications
Dim flightConditionEventRule As _
SubscriptionConditionEventRule = _
New SubscriptionConditionEventRule( _
flightSubscriptions, "FlightConditionEventRule")
flightConditionEventRule.EventClassName = "FlightEvents"
flightConditionEventRule.ActionTimeout = New TimeSpan(0, 2, 0)
flightConditionEventRule.SqlLoginName = "MyLowPrivLogin"
flightConditionEventRule.SqlUserName = "MyLowPrivUser"
flightConditionEventRule.InputTypeName = "FlightEvents"
flightConditionEventRule.InputTypeSchema = "MyAppSchema"
flightConditionEventRule.SqlExpression = _
"INSERT INTO MyAppSchema.FlightNotifications " + _
"(SubscriberId, DeviceName, SubscriberLocale, LeavingFrom, " + _
"GoingTo, Price) SELECT [Subscription.SubscriberId], " + _
"[Subscription.DeviceName], [Subscription.SubscriberLocale], " + _
"[Input.LeavingFrom], [Input.GoingTo], [Input.Price] " + _
"FROM MyAppSchema.FlightConditionEventRule;"
flightSubscriptions.SubscriptionConditionEventRules.Add( _
flightConditionEventRule)
スレッド セーフ
この型の public static (Microsoft Visual Basic では共有 ) メンバは、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォーム
開発プラットフォーム
サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。
対象プラットフォーム
サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。
参照
関連項目
SubscriptionConditionEventRule Class
SubscriptionConditionEventRule Members
Microsoft.SqlServer.Management.Nmo Namespace
その他の技術情報
EventRule の EventClassName 要素 (ADF)
イベント ルールの定義
条件アクションの定義
EventRule 要素 (ADF)
ConditionAction 要素 (ADF)