TableInputType Class
Describes a Table object that can be used as an input to a RuleLogic instance.
Пространство имен: Microsoft.SqlServer.NotificationServices.Rules
Сборка: Microsoft.SqlServer.NotificationServices.Rules (in microsoft.sqlserver.notificationservices.rules.dll)
Синтаксис
'Декларация
Public Class TableInputType
Inherits InputType
public class TableInputType : InputType
public ref class TableInputType : public InputType
public class TableInputType extends InputType
public class TableInputType extends InputType
Замечания
This class cannot be inherited.
You must set the Table property using the property or the TableInputType(Table) constructor.
Inheritance Hierarchy
System.Object
Microsoft.SqlServer.NotificationServices.Rules.RuleObject
Microsoft.SqlServer.NotificationServices.Rules.InputType
Microsoft.SqlServer.NotificationServices.Rules.TableInputType
Пример
The following example shows the use of a TableInputType when defining a FilterRule object. The filter uses a SimpleLeafCondition defined over the Production.Location table when filtering input data:
// Subscribe to products in Subassembly location. This
// requires select permissions on all tables in the sample.
//Specify server and database.
Server server = new Server("MyServer");
Database db = server.Databases[nsApplication.DatabaseName];
// Specify tables and views used by the condition.
Table locationTable = db.Tables["Location", "Production"];
Table inventoryTable = db.Tables["ProductInventory", "Production"];
View eventView = db.Views["InventoryTrackerEvents",
"NS_InventoryTrackerApplication"];
// Filter defining "Subassembly" locations.
FilterRule toolCrib = new FilterRule(
new TableInputType(db.Tables["Location", "Production"]),
new SimpleLeafCondition(new FieldValue("Name"),
SimpleOperator.Equals, "Subassembly"));
// Create subscription and define basic properties.
s = new Subscription(nsApplication, subscriptionClassName);
s.SubscriberId = "Stephanie";
s.Enabled = true;
s.RuleName = "InventoryTrackerRule";
s.SetFieldValue("DeviceName", "myDevice");
s.SetFieldValue("SubscriberLocale", "en-us");
// Define a condition using the filter.
s.Condition = new LinkLeafCondition(
LinkLeafOperator.Any,
toolCrib,
new JoinClause(eventView.Columns["ProductId"],
inventoryTable.Columns["ProductId"]),
new JoinClause(inventoryTable.Columns["LocationId"],
locationTable.Columns["LocationId"]));
// Add subscription.
s.Add();
Синхронизация потоков
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.
См. также
Справочник
TableInputType Members
Microsoft.SqlServer.NotificationServices.Rules Namespace