ViewInputType Constructor (View)
Initializes a new instance of the ViewInputType class with a View object.
Spazio dei nomi: Microsoft.SqlServer.NotificationServices.Rules
Assembly : Microsoft.SqlServer.NotificationServices.Rules (in microsoft.sqlserver.notificationservices.rules.dll)
Sintassi
'Dichiarazione
Public Sub New ( _
view As View _
)
public ViewInputType (
View view
)
public:
ViewInputType (
View^ view
)
public ViewInputType (
View view
)
public function ViewInputType (
view : View
)
Parametri
Esempio
The following example shows how to specify a view (specifically, an event view) as the InputType for a PropertyRule object:
// Define a new property that defines "Few," "Some," and "Alot"
// of inventory.
PropertyRule quantityCategory = new PropertyRule(
new ViewInputType(eventView),
new PropertyStatement(new SimpleLeafCondition(
new FieldValue("Quantity"),
SimpleOperator.LessThan, 100), "Few"),
new PropertyStatement(new BetweenLeafCondition(
new FieldValue("Quantity"), 100, 200), "Some"),
new PropertyStatement(new SimpleLeafCondition(
new FieldValue("Quantity"),
SimpleOperator.GreaterThan, 200),
"Alot"));
// Create subscription and define basic properties.
s = new Subscription(nsApplication, subscriptionClassName);
s.SubscriberId = "Scott";
s.Enabled = true;
s.RuleName = "InventoryTrackerRule";
s.SetFieldValue("DeviceName", "myDevice");
s.SetFieldValue("SubscriberLocale", "en-us");
// Use the new property to return only products with "few" remaining
// in inventory. Note that the category definition can be reused.
s.Condition = new SimpleLeafCondition(
new RuleValue(quantityCategory),
SimpleOperator.Equals,
"Few");
// Add subscription.
s.Add();
Piattaforme
Piattaforme di sviluppo
Per un elenco delle piattaforme supportate, vedere Requisiti hardware e software per l'Installazione di SQL Server 2005.
Piattaforme di destinazione
Per un elenco delle piattaforme supportate, vedere Requisiti hardware e software per l'Installazione di SQL Server 2005.
Vedere anche
Riferimento
ViewInputType Class
ViewInputType Members
Microsoft.SqlServer.NotificationServices.Rules Namespace