次の方法で共有


NotificationClass.NotificationComputedFields Property

通知クラスの計算フィールドのコレクションを取得します。

名前空間: Microsoft.SqlServer.Management.Nmo
アセンブリ: Microsoft.SqlServer.Smo (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

プロパティ値

通知クラスの計算フィールドのコレクションを表す NotificationComputedFieldCollection オブジェクトです。

解説

計算フィールド (省略可能) は、コンテンツがコンテンツ フォーマッタに渡される直前に、Transact-SQL の式を使用して通知データを計算します。

使用例

次の例は、計算フィールドを定義して通知クラスの計算フィールドのコレクションに追加する方法を示しています。

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)

スレッド セーフ

この型の public static (Microsoft Visual Basic では共有 ) メンバは、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。

プラットフォーム

開発プラットフォーム

サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。

対象プラットフォーム

サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。

参照

関連項目

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

その他の技術情報

ComputedFields 要素 (ADF)
通知スキーマの定義
通知クラスの定義