EventField.Type Property
Specifies the Microsoft SQL Server data type of the event field.
Namespace: Microsoft.SqlServer.Management.Nmo
Assembly : Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntax
'Declaration
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)
Eigenschaftswert
A String, between 1 and 255 characters in length, that specifies the SQL Server data type.
Hinweise
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 Datentypen (Datenbankmodul).
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 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.
Beispiel
The following examples show how to define an event field that has a data type of nvarchar(6):
// Define a destination field and add it before the Price field
EventField eventDestination =
new EventField(flightEvents, "GoingTo");
eventDestination.Type = "nvarchar(6)";
flightEvents.EventFields.Add(eventDestination, "Price");
' Define a destination field and add it before the Price field.
Dim eventDestination As EventField = _
New EventField(flightEvents, "GoingTo")
eventDestination.Type = "nvarchar(6)"
flightEvents.EventFields.Add(eventDestination, "Price")
Threadsicherheit
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.
Plattformen
Entwicklungsplattformen
Eine Liste der unterstützten Plattformen finden Sie unterHardware- und Softwareanforderungen für die Installation von SQL Server 2005.
Zielplattforme
Eine Liste der unterstützten Plattformen finden Sie unterHardware- und Softwareanforderungen für die Installation von SQL Server 2005.
Siehe auch
Verweis
EventField Class
EventField Members
Microsoft.SqlServer.Management.Nmo Namespace
Andere Ressourcen
Definieren von Kernereignisklassen-Eigenschaften
FieldType Element for EventClass/Schema/Field (ADF)