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 為共用) 成員具備多執行緒作業安全。不保證所有執行個體成員都是安全執行緒。
執行緒安全性
這個型別的任何公用 static (在 Visual Basic 中為 Shared) 成員都是執行緒安全的。並不是所有的執行個體成員都保證可以用於所有的執行緒。