SubscriptionConditionEventRule.InputTypeName Property

Gets or sets the name of the view or table that contains input data for the SubscriptionConditionEventRule.

Namespace: Microsoft.SqlServer.Management.Nmo
Assembly : Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Syntax

'Declaration
Public Property InputTypeName As String
public string InputTypeName { get; set; }
public:
property String^ InputTypeName {
    String^ get ();
    void set (String^ value);
}
/** @property */
public String get_InputTypeName ()

/** @property */
public void set_InputTypeName (String value)
public function get InputTypeName () : String

public function set InputTypeName (value : String)

Eigenschaftswert

A String, between 1 and 128 characters in length, that specifies the name of a table or view.

Hinweise

When you use a SubscriptionConditionEventRule object, you must specify which view or table contains the event data. The fields from the view or table are used to build a new view for the event rule. The condition action selects data from the event rule view.

Typically, the InputTypeName value is the name the event view, which has the same name as an event class.

For more information, see Definieren von Bedingungsaktionen.

Beispiel

The following example shows how to define a condition-based, event-driven subscription rule and add it to a subscription class:

// 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)

Threadsicherheit

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Plattformen

Entwicklungsplattformen

Eine Liste der unterstützten Plattformen finden Sie unterHardware- und Softwareanforderungen für die Installation von SQL Server 2005.

Zielplattforme

Eine Liste der unterstützten Plattformen finden Sie unterHardware- und Softwareanforderungen für die Installation von SQL Server 2005.

Siehe auch

Verweis

SubscriptionConditionEventRule Class
SubscriptionConditionEventRule Members
Microsoft.SqlServer.Management.Nmo Namespace

Andere Ressourcen

InputName Element (ADF)
Definieren von Ereignisregeln
Definieren von Bedingungsaktionen
EventRule Element (ADF)
ConditionAction Element (ADF)