DataType-Klasse

The DataType object represents a SQL Server data type.

Vererbungshierarchie

System.Object
  Microsoft.SqlServer.Management.Smo.DataType

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
Public Class DataType _
    Implements IXmlSerializable
'Usage
Dim instance As DataType
public class DataType : IXmlSerializable
public ref class DataType : IXmlSerializable
type DataType =  
    class 
        interface IXmlSerializable 
    end
public class DataType implements IXmlSerializable

Der DataType-Typ macht folgende Elemente verfügbar.

Konstruktoren

  Name Beschreibung
Öffentliche Methode DataType() Initializes a new instance of the DataType class.
Öffentliche Methode DataType(SqlDataType) Initializes a new instance of the DataType class based on a specified SQL Server data type.
Öffentliche Methode DataType(UserDefinedDataType) Initializes a new instance of the DataType class based on a specified user-defined data type.
Öffentliche Methode DataType(UserDefinedTableType) Initializes a new instance of the DataType class based on a specified user-defined table type.
Öffentliche Methode DataType(UserDefinedType) Initializes a new instance of the DataType class based on a specified user-defined type.
Öffentliche Methode DataType(XmlSchemaCollection) Initializes a new instance of the DataType class based on a specified XML schema collection.
Öffentliche Methode DataType(SqlDataType, Int32) Initializes a new instance of the DataType class based on a specified SQL Server data type with specified precision or maximum length.
Öffentliche Methode DataType(SqlDataType, String) Initializes a new instance of the DataType class based on a specified SQL Server data type with the specified type.
Öffentliche Methode DataType(SqlDataType, Int32, Int32) Initializes a new instance of the DataType class based on a specified SQL Server data type with the specified precision and scale.
Öffentliche Methode DataType(SqlDataType, String, String) Initializes a new instance of the DataType class based on a specified SQL Server data type with the specified type and schema.

Zum Anfang

Eigenschaften

  Name Beschreibung
Öffentliche EigenschaftStatisches Element BigInt Gets a data type that specifies the BigInt definition used in the data type.
Öffentliche EigenschaftStatisches Element Bit Gets a data type that specifies the Bit definition used in the data type.
Öffentliche EigenschaftStatisches Element Date The Date property returns a Date data type.
Öffentliche EigenschaftStatisches Element DateTime Gets a data type that specifies the DateTime definition used in the data type.
Öffentliche EigenschaftStatisches Element Float Gets a data type that specifies the Float definition used in the data type.
Öffentliche EigenschaftStatisches Element Geography The geography data type represents data in a round-earth coordinate system. The SQL Server geography data type stores ellipsoidal (round-earth) data, such as GPS latitude and longitude coordinates.
Öffentliche EigenschaftStatisches Element Geometry The Geometry property contains spatial data that represents information about the physical location and shape of geometric objects.
Öffentliche EigenschaftStatisches Element HierarchyId The HierarchyId property is used to identify a position in a hierarchy.
Öffentliche EigenschaftStatisches Element Image Gets a data type that specifies the Image definition used in the data type.
Öffentliche EigenschaftStatisches Element Int Gets a data type that specifies the Int definition used in the data type.
Öffentliche Eigenschaft MaximumLength Gets the maximum length of the data type.
Öffentliche EigenschaftStatisches Element Money Gets a data type that specifies the Money definition used in the data type.
Öffentliche Eigenschaft Name Gets the name of the data type.
Öffentliche EigenschaftStatisches Element NText Gets a data type that specifies the NText definition used in the data type.
Öffentliche Eigenschaft NumericPrecision Gets or sets the numeric precision of the data type.
Öffentliche Eigenschaft NumericScale Gets or sets the numeric scale of the data type.
Öffentliche EigenschaftStatisches Element NVarCharMax Gets a data type that specifies the VarCharMax definition used in the data type.
Öffentliche EigenschaftStatisches Element Real Gets a data type that specifies the Money definition used in the data type.
Öffentliche Eigenschaft Schema Gets or sets the schema of the data type.
Öffentliche EigenschaftStatisches Element SmallDateTime Gets a data type that specifies the SmallDateTime definition used in the data type.
Öffentliche EigenschaftStatisches Element SmallInt Gets a data type that specifies the SmallInt definition used in the data type.
Öffentliche EigenschaftStatisches Element SmallMoney Gets a data type that specifies the SmallMoney definition used in the data type.
Öffentliche Eigenschaft SqlDataType Gets a data type that specifies the SqlDataType definition used in the data type.
Öffentliche EigenschaftStatisches Element SysName Gets a data type that specifies the SysName definition used in the data type.
Öffentliche EigenschaftStatisches Element Text Gets a data type that specifies the Text definition used in the data type.
Öffentliche EigenschaftStatisches Element Timestamp Gets a data type that specifies the TimeStamp definition used in the data type.
Öffentliche EigenschaftStatisches Element TinyInt Gets a data type that specifies the TinyInt definition used in the data type.
Öffentliche EigenschaftStatisches Element UniqueIdentifier Gets a data type that specifies the UniqueIdentifier definition used in the data type.
Öffentliche EigenschaftStatisches Element VarBinaryMax Gets a data type that specifies the VarBinaryMax definition used in the data type.
Öffentliche EigenschaftStatisches Element VarCharMax Gets a data type that specifies the VarCharMax definition used in the data type.
Öffentliche EigenschaftStatisches Element Variant Gets a data type that specifies the Variant definition used in the data type.
Öffentliche Eigenschaft XmlDocumentConstraint Gets or sets a value that indicates how an XML document is formatted.

Zum Anfang

Methoden

  Name Beschreibung
Öffentliche MethodeStatisches Element Binary Returns an object that represents the specified type.
Öffentliche MethodeStatisches Element Char Returns an object that represents the specified type.
Öffentliche MethodeStatisches Element DateTime2 datetime2 is an extension of the existing datetime type. It has a large date range and large default fractional precision. It has a length of at least 19 positions.
Öffentliche MethodeStatisches Element DateTimeOffset Returns values for year, month, day, valid time of day between 00:00:00 and 23:59:59:9999999 and offset, in hours, from UTC. It has a length of at least 25 positions.
Öffentliche MethodeStatisches Element Decimal Returns an object that represents the specified type.
Öffentliche Methode Equals(Object) Determines whether the specified object is considered equal to the current data type. (Überschreibt Object.Equals(Object).)
Öffentliche Methode Equals(DataType) Determines whether the specified data types are considered equal.
Geschützte Methode Finalize (Geerbt von Object.)
Öffentliche Methode GetHashCode This method supports the SQL Server infrastructure and is not intended to be used directly from your code. (Überschreibt Object.GetHashCode().)
Öffentliche Methode GetType (Geerbt von Object.)
Geschützte Methode MemberwiseClone (Geerbt von Object.)
Öffentliche MethodeStatisches Element NChar Returns an object that represents the specified type.
Öffentliche MethodeStatisches Element Numeric Returns an object that represents the specified type.
Öffentliche MethodeStatisches Element NVarChar Returns an object that represents the specified type.
Öffentliche MethodeStatisches Element Time Returns values for any valid time of day between 00:00:00 and 23:59:59:9999999. It has a length of at least eight positions and contains the time in hours, minutes, seconds and fractional seconds.
Öffentliche Methode ToString Returns the object in string format. (Überschreibt Object.ToString().)
Öffentliche MethodeStatisches Element UserDefinedDataType(String) Returns an object that represents the specified type.
Öffentliche MethodeStatisches Element UserDefinedDataType(String, String) Returns an object that represents the specified type with the specified schema.
Öffentliche MethodeStatisches Element UserDefinedTableType(String) Returns an object that represents the specified type.
Öffentliche MethodeStatisches Element UserDefinedTableType(String, String) Returns an object that represents the specified type with the specified schema.
Öffentliche MethodeStatisches Element UserDefinedType(String) Returns an object that represents the specified type.
Öffentliche MethodeStatisches Element UserDefinedType(String, String) Returns an object that represents the specified type with the specified schema.
Öffentliche MethodeStatisches Element VarBinary Returns an object that represents the specified type.
Öffentliche MethodeStatisches Element VarChar Returns an object that represents the specified type.
Öffentliche MethodeStatisches Element Xml(String) Returns an object that represents the specified type.
Öffentliche MethodeStatisches Element Xml(String, String) Returns an object that represents the specified type and with the specified schema.
Öffentliche MethodeStatisches Element Xml(String, String, XmlDocumentConstraint) Returns an object that represents the specified type, schema and XML document constraint.

Zum Anfang

Explizite Schnittstellenimplementierungen

  Name Beschreibung
Explizite SchnittstellenimplementierungPrivate Methode IXmlSerializable.GetSchema Not implemented.
Explizite SchnittstellenimplementierungPrivate Methode IXmlSerializable.ReadXml Deserializes the DAC type properties from an XML stream. Nur für Informationszwecke identifiziert. Nicht unterstützt. Zukünftige Kompatibilität wird nicht sichergestellt..
Explizite SchnittstellenimplementierungPrivate Methode IXmlSerializable.WriteXml Serializes the data type properties to an XML stream. Nur für Informationszwecke identifiziert. Nicht unterstützt. Zukünftige Kompatibilität wird nicht sichergestellt..

Zum Anfang

Hinweise

The DataType object is used to specify the type of data that is associated primarily with columns and parameters.

Thread Safety

Alle öffentlichen, statischen Elemente dieses Typs (Shared in Microsoft Visual Basic) sind für Vorgänge mit mehreren Threads sicher. Bei Instanzmembern ist die Threadsicherheit nicht gewährleistet.

Beispiele

Arbeiten mit Datentypen

Threadsicherheit

Alle öffentlichen static (Shared in Visual Basic)-Elemente dieses Typs sind Threadsicher. Für Instanzelemente wird die Threadsicherheit nicht gewährleistet.

Siehe auch

Verweis

Microsoft.SqlServer.Management.Smo-Namespace