NotificationComputedFieldCollection.Add Method (NotificationComputedField)
Adds an NotificationComputedField to the NotificationComputedFieldCollection.
Пространство имен: Microsoft.SqlServer.Management.Nmo
Сборка: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Синтаксис
'Декларация
Public Sub Add ( _
notificationComputedField As NotificationComputedField _
)
public void Add (
NotificationComputedField notificationComputedField
)
public:
void Add (
NotificationComputedField^ notificationComputedField
)
public void Add (
NotificationComputedField notificationComputedField
)
public function Add (
notificationComputedField : NotificationComputedField
)
Параметры
- notificationComputedField
The NotificationComputedField to add to the collection.
Замечания
If you add fields after deploying the instance, you must Update the instance to apply the changes.
Пример
The following example shows how to define a computed field and then add it to the collection of computed fields:
NotificationComputedField computedPrice =
new NotificationComputedField(flightNotifications,
"FormattedPrice");
computedPrice.SqlExpression = "CONVERT(NVARCHAR(10), Price, 1)";
flightNotifications.NotificationComputedFields.Add(computedPrice);
Dim computedPrice As NotificationComputedField = _
New NotificationComputedField(flightNotifications, _
"FormattedPrice")
computedPrice.SqlExpression = "CONVERT(NVARCHAR(10), Price, 1)"
flightNotifications.NotificationComputedFields.Add( _
computedPrice)
Синхронизация потоков
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.
См. также
Справочник
NotificationComputedFieldCollection Class
NotificationComputedFieldCollection Members
Microsoft.SqlServer.Management.Nmo Namespace