SubscriptionField.Type Property
Specifies the Microsoft SQL Server data type of the subscription field.
Пространство имен: Microsoft.SqlServer.Management.Nmo
Сборка: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Синтаксис
'Декларация
Public Property Type As String
public string Type { get; set; }
public:
property String^ Type {
String^ get ();
void set (String^ value);
}
/** @property */
public String get_Type ()
/** @property */
public void set_Type (String value)
public function get Type () : String
public function set Type (value : String)
Значение свойства
A String, between 1 and 255 characters in length, that specifies the SQL Server data type.
Замечания
Field types must conform to SQL Server data types. The following data types are supported by Notification Services:
bigint |
float |
real |
tinyint |
binary |
int |
smalldatetime |
uniqueidentifier |
bit |
money |
smallint |
varbinary |
char |
nchar |
smallmoney |
varchar |
datetime |
nvarchar |
sql_variant |
xml |
decimal |
numeric |
|
|
The text, ntext, and image data types are not supported because they cannot be used as values for parameters and variables in stored procedures. In addition, the timestamp data type is not supported. For more information about SQL Server data types, see Типы данных (компонент Database Engine).
If using the xml data type with the XSLT content formatter, the content formatter might attempt to transform the XML data. To preserve the XML markup, set the content formatter's DisableEscaping argument to false.
If you modify a field type, updating the application re-creates the subscription class to which it corresponds. Notification Services renames the existing subscription tables by appending "Old" to the table name and then creates new tables. Existing subscription table indexes are left unchanged.
If you want to transfer data between the old and new subscription tables, it must be done manually. For more information, see Обновление приложения.
Пример
The following examples show how to define a subscription field with the data type nvarchar(10) and then add it to the subscription schema:
// Define a SubscriberLocale field that cannot be NULL
// Add the field to the end of the field collection
SubscriptionField subLocale =
new SubscriptionField(flightSubscriptions, "SubscriberLocale");
subLocale.Type = "nvarchar(10)";
subLocale.TypeModifier = "not null";
flightSubscriptions.SubscriptionFields.Add(subLocale);
' Define a SubscriberLocale field that cannot be NULL
' Add the field to the end of the field collection
Dim subLocale As SubscriptionField = _
New SubscriptionField(flightSubscriptions, _
"SubscriberLocale")
subLocale.Type = "nvarchar(10)"
subLocale.TypeModifier = "not null"
flightSubscriptions.SubscriptionFields.Add(subLocale)
Синхронизация потоков
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.
Платформы
Платформы разработки
Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.
Целевые платформы
Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.
См. также
Справочник
SubscriptionField Class
SubscriptionField Members
Microsoft.SqlServer.Management.Nmo Namespace
Другие ресурсы
FieldType Element for SubscriptionClass/Schema/Field (ADF)
Определение схемы подписок