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

此类型的任何公共静态(Microsoft Visual Basic 中的 Shared)成员在多线程操作中是安全的。不保证所有实例成员都是线程安全的。

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。不保证所有实例成员都是线程安全的。