NotificationField.Type Property
Gets or sets the Microsoft SQL Server data type of the field.
Spazio dei nomi: Microsoft.SqlServer.Management.Nmo
Assembly : Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Sintassi
'Dichiarazione
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)
Valore proprietà
A String, between 1 and 255 characters in length, that specifies the data type of the field.
Osservazioni
You must set the field type for all notification fields.
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 Tipi di dati (Motore di database).
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 deletes and re-creates the notification class to which it corresponds. This includes dropping and re-creating the SQL Server tables and indexes used by this notification class. Any data existing in the original notification class tables is permanently deleted.
Esempio
The following examples show how to define a notification field that has a data type of float, and then add it to the collection of notification fields for a notification class:
// Define a Price field and add it at position 1 in the collection
NotificationField notificationPrice =
new NotificationField(flightNotifications, "Price");
notificationPrice.Type = "float";
flightNotifications.NotificationFields.Add(notificationPrice, 1);
' Define a Price field and add it at position 1
' in the collection.
Dim notificationPrice As NotificationField = _
New NotificationField(flightNotifications, "Price")
notificationPrice.Type = "float"
flightNotifications.NotificationFields.Add( _
notificationPrice, 1)
Thread Safety
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.
Piattaforme
Piattaforme di sviluppo
Per un elenco delle piattaforme supportate, vedere Requisiti hardware e software per l'Installazione di SQL Server 2005.
Piattaforme di destinazione
Per un elenco delle piattaforme supportate, vedere Requisiti hardware e software per l'Installazione di SQL Server 2005.
Vedere anche
Riferimento
NotificationField Class
NotificationField Members
Microsoft.SqlServer.Management.Nmo Namespace
Altre risorse
FieldType Element for NotificationClass/Schema/Fields/Field (ADF)
Definizione dello schema delle notifiche