サブスクリプション フィールドの Microsoft SQL Server フィールド属性 (オプション) を取得または設定します。
名前空間: Microsoft.SqlServer.Management.Nmo
アセンブリ: Microsoft.SqlServer.Smo (microsoft.sqlserver.smo.dll 内)
構文
'宣言
Public Property TypeModifier As String
public string TypeModifier { get; set; }
public:
property String^ TypeModifier {
String^ get ();
void set (String^ value);
}
/** @property */
public String get_TypeModifier ()
/** @property */
public void set_TypeModifier (String value)
public function get TypeModifier () : String
public function set TypeModifier (value : String)
プロパティ値
サブスクリプション フィールドの型の修飾子を示す長さ 1 ~ 255 文字の String です。
解説
フィールドの型の修飾子は、NOT NULL または DEFAULT constant_expression などのテーブル列修飾子に相当します。この値は、Transact-SQL 構文規則に準拠する必要があります。
サブスクリプション フィールドを SQL Server の Identity 列として指定することはできません。Notification Services では、システムが生成した SubscriptionId フィールドを指定するために Identity プロパティが既に使用されています。
設定可能な値の詳細については、「CREATE TABLE (Transact-SQL)」を参照してください。
フィールドの型の修飾子を更新した後、アプリケーションを更新すると、対応するサブスクリプション クラスが再作成されます。Notification Services は、既存のサブスクリプション テーブルの名前に "Old" を追加して名前を変更してから、新しいテーブルを作成します。以前のサブスクリプション テーブルのインデックスは、変更されずに残されます。
以前のサブスクリプション テーブルから新しいサブスクリプション テーブルにデータを転送するには、手動で転送する必要があります。詳細については、「アプリケーションの更新」を参照してください。
使用例
次の例は、NULL 値を許可しないサブスクリプション フィールドを定義してサブスクリプション スキーマに追加する方法を示しています。
// Define a DeviceName field that cannot be NULL
// Add the field to the end of the field collection
SubscriptionField subDevice =
new SubscriptionField(flightSubscriptions, "DeviceName");
subDevice.Type = "nvarchar(255)";
subDevice.TypeModifier = "not null";
flightSubscriptions.SubscriptionFields.Add(subDevice);
' Define a DeviceName field that cannot be NULL
' Add the field to the end of the field collection
Dim subDevice As SubscriptionField = _
New SubscriptionField(flightSubscriptions, "DeviceName")
subDevice.Type = "nvarchar(255)"
subDevice.TypeModifier = "not null"
flightSubscriptions.SubscriptionFields.Add(subDevice)
スレッド セーフ
この型の public static (Microsoft Visual Basic では共有 ) メンバは、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォーム
開発プラットフォーム
サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。
対象プラットフォーム
サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。
参照
関連項目
SubscriptionField Class
SubscriptionField Members
Microsoft.SqlServer.Management.Nmo Namespace