SubscriptionConditionScheduledRule.InputTypeName Property

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

Пространство имен: Microsoft.SqlServer.Management.Nmo
Сборка: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Синтаксис

'Декларация
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)

Значение свойства

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

Замечания

When you use a SubscriptionConditionScheduledRule 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.

For scheduled rules, the InputTypeName value is typically the name of an event chronicle.

For more information, see Определение условных действий.

Пример

The following examples show how to define a condition-based, scheduled subscription rule and add it to a subscription class:

// Add a rule to generate condition-based, scheduled notifications
SubscriptionConditionScheduledRule flightConditionScheduledRule = 
    new SubscriptionConditionScheduledRule(
    flightSubscriptions, "FlightConditionScheduledRule");
flightConditionScheduledRule.ActionTimeout = 
    new TimeSpan(0, 2, 0);
flightConditionScheduledRule.SqlLoginName = "MyLowPrivLogin";
flightConditionScheduledRule.SqlUserName = "MyLowPrivUser";
flightConditionScheduledRule.InputTypeName = "FlightEventChronicle";
flightConditionScheduledRule.InputTypeSchema = "MyAppSchema";
flightConditionScheduledRule.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.FlightConditionScheduledRule;";
flightSubscriptions.SubscriptionConditionScheduledRules.Add(
    flightConditionScheduledRule);
' Add a rule to generate condition-based, scheduled notifications
Dim flightConditionScheduledRule As _
    SubscriptionConditionScheduledRule = _
    New SubscriptionConditionScheduledRule( _
    flightSubscriptions, "FlightConditionScheduledRule")
flightConditionScheduledRule.ActionTimeout = _
    New TimeSpan(0, 2, 0)
flightConditionScheduledRule.SqlLoginName = "MyLowPrivLogin"
flightConditionScheduledRule.SqlUserName = "MyLowPrivUser"
flightConditionScheduledRule.InputTypeName = _
    "FlightEventChronicle"
flightConditionScheduledRule.InputTypeSchema = "MyAppSchema"
flightConditionScheduledRule.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.FlightConditionScheduledRule;"
flightSubscriptions.SubscriptionConditionScheduledRules.Add( _
    flightConditionScheduledRule)

Синхронизация потоков

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.

Платформы

Платформы разработки

Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.

Целевые платформы

Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.

См. также

Справочник

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

Другие ресурсы

Определение запланированных правил
Определение условных действий
ScheduledRule Element (ADF)
ConditionAction Element (ADF)