NotificationComputedFieldCollection に NotificationComputedField を追加します。
名前空間: Microsoft.SqlServer.Management.Nmo
アセンブリ: Microsoft.SqlServer.Smo (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
コレクションに追加する NotificationComputedField です。
解説
インスタンスを配置した後にフィールドを追加した場合は、インスタンスに対して Update を実行して変更を適用する必要があります。
使用例
次の例は、計算フィールドを定義し、計算フィールドのコレクションに追加する方法を示しています。
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 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。
参照
関連項目
NotificationComputedFieldCollection Class
NotificationComputedFieldCollection Members
Microsoft.SqlServer.Management.Nmo Namespace