共用方式為


NotificationClass.NotificationComputedFields Property

Gets the collection of computed fields for the notification class.

命名空間: Microsoft.SqlServer.Management.Nmo
組件: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

語法

'宣告
Public ReadOnly Property NotificationComputedFields As NotificationComputedFieldCollection
public NotificationComputedFieldCollection NotificationComputedFields { get; }
public:
property NotificationComputedFieldCollection^ NotificationComputedFields {
    NotificationComputedFieldCollection^ get ();
}
/** @property */
public NotificationComputedFieldCollection get_NotificationComputedFields ()
public function get NotificationComputedFields () : NotificationComputedFieldCollection

屬性值

A NotificationComputedFieldCollection object that represents the collection of computed fields for the notification class.

備註

Computed fields, which are optional, use Transact-SQL expressions to compute notification data immediately before the content is passed to the content formatter.

範例

The following examples show how to define a computed field and then add it to the collection of computed fields for a notification class:

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.

平台

開發平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

目標平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

請參閱

參考

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

其他資源

ComputedFields Element (ADF)
定義通知結構描述
定義通知類別