次の方法で共有


NotificationComputedField.Parent Property

計算フィールドの親である NotificationClass を取得または設定します。

名前空間: Microsoft.SqlServer.Management.Nmo
アセンブリ: Microsoft.SqlServer.Smo (microsoft.sqlserver.smo.dll 内)

構文

'宣言
Public Property Parent As NotificationClass
public NotificationClass Parent { get; set; }
public:
property NotificationClass^ Parent {
    NotificationClass^ get ();
    void set (NotificationClass^ value);
}
/** @property */
public NotificationClass get_Parent ()

/** @property */
public void set_Parent (NotificationClass value)
public function get Parent () : NotificationClass

public function set Parent (value : NotificationClass)

プロパティ値

親である NotificationClass オブジェクトです。

解説

更新されたテキスト :2005 年 12 月 5 日

更新されたサンプル コード :2005 年 12 月 5 日

NotificationComputedField には、それぞれ親の NotificationClass があります。通常は、NotificationComputedField(NotificationClass,String) コンストラクタを使用して NotificationComputedField を作成する際に、親オブジェクトを指定します。

コンストラクタで親を設定する場合は、このプロパティを使用して親を設定しないでください。親を 2 回設定すると例外がスローされます。

使用例

次の例は、既定のコンストラクタを使用する場合に Parent プロパティを設定する方法を示しています。

NotificationComputedField computedPrice = 
    new NotificationComputedField();
computedPrice.Name = "FormattedPrice";
computedPrice.Parent = flightNotifications;
computedPrice.DigestGrouping = false;
computedPrice.SqlExpression = "CONVERT(NVARCHAR(10), Price, 1)";
flightNotifications.NotificationComputedFields.Add(computedPrice);
Dim computedPrice As NotificationComputedField = _
    New NotificationComputedField()
computedPrice.Name = "FormattedPrice"
computedPrice.Parent = flightNotifications
computedPrice.DigestGrouping = False
computedPrice.SqlExpression = "CONVERT(NVARCHAR(10), Price, 1)"
flightNotifications.NotificationComputedFields.Add(computedPrice)

スレッド セーフ

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

プラットフォーム

開発プラットフォーム

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

対象プラットフォーム

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

参照

関連項目

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

その他の技術情報

NotificationClass 要素 (ADF)
通知スキーマの定義