Gets or sets the optional Microsoft SQL Server field attributes for an event field.
命名空间: Microsoft.SqlServer.Management.Nmo
程序集: Microsoft.SqlServer.Smo (in 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)
属性值
A String, between 1 and 255 characters in length, that specifies the type modifiers for the event field.
备注
Field type modifiers are equivalent to table column modifiers, such as NOT NULL or DEFAULT constant_expression. The value must conform to the Transact-SQL syntax conventions.
You cannot specify an event data field as an Identity column in SQL Server. Notification Services already uses the Identity property to specify a system-generated EventId field.
For more information about possible values, see CREATE TABLE (Transact-SQL).
If you update a field type modifier, updating the application deletes and re-creates the event class to which it corresponds. This includes dropping and re-creating the SQL Server tables and indexes used by this event class. Any data existing in the original event class tables is permanently deleted.
示例
The following examples show how to define an event field that does not allow null values:
// Add an orgin field to the end of the field collection
EventField eventOrgin = 
    new EventField(flightEvents, "LeavingFrom");
eventOrgin.Type = "nvarchar(6)";
eventOrgin.TypeModifier = "not null";
flightEvents.EventFields.Add(eventOrgin);
' Add an orgin field to the end of the field collection.
Dim eventOrgin As EventField = _
    New EventField(flightEvents, "LeavingFrom")
eventOrgin.Type = "nvarchar(6)"
eventOrgin.TypeModifier = "not null"
flightEvents.EventFields.Add(eventOrgin)
线程安全
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
平台
开发平台
有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。
目标平台
有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。
请参阅
参考
EventField Class
EventField Members
Microsoft.SqlServer.Management.Nmo Namespace
其他资源
定义核心事件类属性
FieldTypeMods Element for EventClass/Schema/Field (ADF)