次の方法で共有


NotificationComputedField Constructor ()

NotificationComputedField クラスの新しいインスタンスを初期化します。

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

構文

'宣言
Public Sub New
public NotificationComputedField ()
public:
NotificationComputedField ()
public NotificationComputedField ()
public function NotificationComputedField ()

解説

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

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

既定のコンストラクタを使用する場合は、直ちに Name プロパティを設定してから、Parent プロパティを設定する必要があります。その後、必須の DigestGrouping プロパティなど、その他のプロパティを設定できます。

使用例

次の例は、この既定のコンストラクタを使用して計算フィールドを作成し、通知クラスに追加する方法を示しています。

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)

プラットフォーム

開発プラットフォーム

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

対象プラットフォーム

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

参照

関連項目

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