Поделиться через


Класс DataType

The DataType object represents a SQL Server data type.

Иерархия наследования

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

Пространство имен:  Microsoft.SqlServer.Management.Smo
Сборка:  Microsoft.SqlServer.Smo (в Microsoft.SqlServer.Smo.dll)

Синтаксис

'Декларация
Public Class DataType _
    Implements IXmlSerializable
'Применение
Dim instance As DataType
public class DataType : IXmlSerializable
public ref class DataType : IXmlSerializable
type DataType =  
    class 
        interface IXmlSerializable 
    end
public class DataType implements IXmlSerializable

Тип DataType обеспечивает доступ к следующим элементам.

Конструкторы

  Имя Описание
Открытый метод DataType() Initializes a new instance of the DataType class.
Открытый метод DataType(SqlDataType) Initializes a new instance of the DataType class based on a specified SQL Server data type.
Открытый метод DataType(UserDefinedDataType) Initializes a new instance of the DataType class based on a specified user-defined data type.
Открытый метод DataType(UserDefinedTableType) Initializes a new instance of the DataType class based on a specified user-defined table type.
Открытый метод DataType(UserDefinedType) Initializes a new instance of the DataType class based on a specified user-defined type.
Открытый метод DataType(XmlSchemaCollection) Initializes a new instance of the DataType class based on a specified XML schema collection.
Открытый метод 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.
Открытый метод DataType(SqlDataType, String) Initializes a new instance of the DataType class based on a specified SQL Server data type with the specified type.
Открытый метод 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.
Открытый метод 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.

В начало

Свойства

  Имя Описание
Открытое свойствоСтатический элемент BigInt Gets a data type that specifies the BigInt definition used in the data type.
Открытое свойствоСтатический элемент Bit Gets a data type that specifies the Bit definition used in the data type.
Открытое свойствоСтатический элемент Date The Date property returns a Date data type.
Открытое свойствоСтатический элемент DateTime Gets a data type that specifies the DateTime definition used in the data type.
Открытое свойствоСтатический элемент Float Gets a data type that specifies the Float definition used in the data type.
Открытое свойствоСтатический элемент 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.
Открытое свойствоСтатический элемент Geometry The Geometry property contains spatial data that represents information about the physical location and shape of geometric objects.
Открытое свойствоСтатический элемент HierarchyId The HierarchyId property is used to identify a position in a hierarchy.
Открытое свойствоСтатический элемент Image Gets a data type that specifies the Image definition used in the data type.
Открытое свойствоСтатический элемент Int Gets a data type that specifies the Int definition used in the data type.
Открытое свойство MaximumLength Gets the maximum length of the data type.
Открытое свойствоСтатический элемент Money Gets a data type that specifies the Money definition used in the data type.
Открытое свойство Name Gets the name of the data type.
Открытое свойствоСтатический элемент NText Gets a data type that specifies the NText definition used in the data type.
Открытое свойство NumericPrecision Gets or sets the numeric precision of the data type.
Открытое свойство NumericScale Gets or sets the numeric scale of the data type.
Открытое свойствоСтатический элемент NVarCharMax Gets a data type that specifies the VarCharMax definition used in the data type.
Открытое свойствоСтатический элемент Real Gets a data type that specifies the Money definition used in the data type.
Открытое свойство Schema Gets or sets the schema of the data type.
Открытое свойствоСтатический элемент SmallDateTime Gets a data type that specifies the SmallDateTime definition used in the data type.
Открытое свойствоСтатический элемент SmallInt Gets a data type that specifies the SmallInt definition used in the data type.
Открытое свойствоСтатический элемент SmallMoney Gets a data type that specifies the SmallMoney definition used in the data type.
Открытое свойство SqlDataType Gets a data type that specifies the SqlDataType definition used in the data type.
Открытое свойствоСтатический элемент SysName Gets a data type that specifies the SysName definition used in the data type.
Открытое свойствоСтатический элемент Text Gets a data type that specifies the Text definition used in the data type.
Открытое свойствоСтатический элемент Timestamp Gets a data type that specifies the TimeStamp definition used in the data type.
Открытое свойствоСтатический элемент TinyInt Gets a data type that specifies the TinyInt definition used in the data type.
Открытое свойствоСтатический элемент UniqueIdentifier Gets a data type that specifies the UniqueIdentifier definition used in the data type.
Открытое свойствоСтатический элемент VarBinaryMax Gets a data type that specifies the VarBinaryMax definition used in the data type.
Открытое свойствоСтатический элемент VarCharMax Gets a data type that specifies the VarCharMax definition used in the data type.
Открытое свойствоСтатический элемент Variant Gets a data type that specifies the Variant definition used in the data type.
Открытое свойство XmlDocumentConstraint Gets or sets a value that indicates how an XML document is formatted.

В начало

Методы

  Имя Описание
Открытый методСтатический элемент Binary Returns an object that represents the specified type.
Открытый методСтатический элемент Char Returns an object that represents the specified type.
Открытый методСтатический элемент 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.
Открытый методСтатический элемент 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.
Открытый методСтатический элемент Decimal Returns an object that represents the specified type.
Открытый метод Equals(Object) Determines whether the specified object is considered equal to the current data type. (Переопределяет Object.Equals(Object).)
Открытый метод Equals(DataType) Determines whether the specified data types are considered equal.
Защищенный метод Finalize (Производный от Object.)
Открытый метод GetHashCode This method supports the SQL Server infrastructure and is not intended to be used directly from your code. (Переопределяет Object.GetHashCode().)
Открытый метод GetType (Производный от Object.)
Защищенный метод MemberwiseClone (Производный от Object.)
Открытый методСтатический элемент NChar Returns an object that represents the specified type.
Открытый методСтатический элемент Numeric Returns an object that represents the specified type.
Открытый методСтатический элемент NVarChar Returns an object that represents the specified type.
Открытый методСтатический элемент 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.
Открытый метод ToString Returns the object in string format. (Переопределяет Object.ToString().)
Открытый методСтатический элемент UserDefinedDataType(String) Returns an object that represents the specified type.
Открытый методСтатический элемент UserDefinedDataType(String, String) Returns an object that represents the specified type with the specified schema.
Открытый методСтатический элемент UserDefinedTableType(String) Returns an object that represents the specified type.
Открытый методСтатический элемент UserDefinedTableType(String, String) Returns an object that represents the specified type with the specified schema.
Открытый методСтатический элемент UserDefinedType(String) Returns an object that represents the specified type.
Открытый методСтатический элемент UserDefinedType(String, String) Returns an object that represents the specified type with the specified schema.
Открытый методСтатический элемент VarBinary Returns an object that represents the specified type.
Открытый методСтатический элемент VarChar Returns an object that represents the specified type.
Открытый методСтатический элемент Xml(String) Returns an object that represents the specified type.
Открытый методСтатический элемент Xml(String, String) Returns an object that represents the specified type and with the specified schema.
Открытый методСтатический элемент Xml(String, String, XmlDocumentConstraint) Returns an object that represents the specified type, schema and XML document constraint.

В начало

Явные реализации интерфейса

  Имя Описание
Явная реализация интерфейсаЗакрытый метод IXmlSerializable.GetSchema Not implemented.
Явная реализация интерфейсаЗакрытый метод IXmlSerializable.ReadXml Deserializes the DAC type properties from an XML stream. Указано только в ознакомительных целях. Не поддерживается. Совместимость с будущими версиями не гарантируется..
Явная реализация интерфейсаЗакрытый метод IXmlSerializable.WriteXml Serializes the data type properties to an XML stream. Указано только в ознакомительных целях. Не поддерживается. Совместимость с будущими версиями не гарантируется..

В начало

Замечания

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

Thread Safety

Все общие статические члены этого типа (Shared в Microsoft Visual Basic) можно использовать в многопоточных операциях. Потокобезопасная работа с членами экземпляров типа не гарантируется.

Примеры

Работа с типами данных

Безопасность многопоточности

Любые открытые статический (Shared в Visual Basic) элементы этого типа потокобезопасны. Потокобезопасность с элементами экземпляров не гарантируется.

См. также

Справочник

Пространство имен Microsoft.SqlServer.Management.Smo