Classe DataType

The DataType object represents a SQL Server data type.

Hiérarchie d'héritage

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

Espace de noms :  Microsoft.SqlServer.Management.Smo
Assembly :  Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)

Syntaxe

'Déclaration
Public Class DataType _
    Implements IXmlSerializable
'Utilisation
Dim instance As DataType
public class DataType : IXmlSerializable
public ref class DataType : IXmlSerializable
type DataType =  
    class
        interface IXmlSerializable
    end
public class DataType implements IXmlSerializable

Le type DataType expose les membres suivants.

Constructeurs

  Nom Description
Méthode publique DataType() () () () Initializes a new instance of the DataType class.
Méthode publique DataType(SqlDataType) Initializes a new instance of the DataType class based on a specified SQL Server data type.
Méthode publique DataType(UserDefinedDataType) Initializes a new instance of the DataType class based on a specified user-defined data type.
Méthode publique DataType(UserDefinedTableType) Initializes a new instance of the DataType class based on a specified user-defined table type.
Méthode publique DataType(UserDefinedType) Initializes a new instance of the DataType class based on a specified user-defined type.
Méthode publique DataType(XmlSchemaCollection) Initializes a new instance of the DataType class based on a specified XML schema collection.
Méthode publique 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.
Méthode publique DataType(SqlDataType, String) Initializes a new instance of the DataType class based on a specified SQL Server data type with the specified type.
Méthode publique 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.
Méthode publique 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.

Haut de la page

Propriétés

  Nom Description
Propriété publiqueMembre statique BigInt Gets a data type that specifies the BigInt definition used in the data type.
Propriété publiqueMembre statique Bit Gets a data type that specifies the Bit definition used in the data type.
Propriété publiqueMembre statique Date The Date property returns a Date data type.
Propriété publiqueMembre statique DateTime Gets a data type that specifies the DateTime definition used in the data type.
Propriété publiqueMembre statique Float Gets a data type that specifies the Float definition used in the data type.
Propriété publiqueMembre statique 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.
Propriété publiqueMembre statique Geometry The Geometry property contains spatial data that represents information about the physical location and shape of geometric objects.
Propriété publiqueMembre statique HierarchyId The HierarchyId property is used to identify a position in a hierarchy.
Propriété publiqueMembre statique Image Gets a data type that specifies the Image definition used in the data type.
Propriété publiqueMembre statique Int Gets a data type that specifies the Int definition used in the data type.
Propriété publique MaximumLength Gets the maximum length of the data type.
Propriété publiqueMembre statique Money Gets a data type that specifies the Money definition used in the data type.
Propriété publique Name Gets the name of the data type.
Propriété publiqueMembre statique NText Gets a data type that specifies the NText definition used in the data type.
Propriété publique NumericPrecision Gets or sets the numeric precision of the data type.
Propriété publique NumericScale Gets or sets the numeric scale of the data type.
Propriété publiqueMembre statique NVarCharMax Gets a data type that specifies the VarCharMax definition used in the data type.
Propriété publiqueMembre statique Real Gets a data type that specifies the Money definition used in the data type.
Propriété publique Schema Gets or sets the schema of the data type.
Propriété publiqueMembre statique SmallDateTime Gets a data type that specifies the SmallDateTime definition used in the data type.
Propriété publiqueMembre statique SmallInt Gets a data type that specifies the SmallInt definition used in the data type.
Propriété publiqueMembre statique SmallMoney Gets a data type that specifies the SmallMoney definition used in the data type.
Propriété publique SqlDataType Gets a data type that specifies the SqlDataType definition used in the data type.
Propriété publiqueMembre statique SysName Gets a data type that specifies the SysName definition used in the data type.
Propriété publiqueMembre statique Text Gets a data type that specifies the Text definition used in the data type.
Propriété publiqueMembre statique Timestamp Gets a data type that specifies the TimeStamp definition used in the data type.
Propriété publiqueMembre statique TinyInt Gets a data type that specifies the TinyInt definition used in the data type.
Propriété publiqueMembre statique UniqueIdentifier Gets a data type that specifies the UniqueIdentifier definition used in the data type.
Propriété publiqueMembre statique VarBinaryMax Gets a data type that specifies the VarBinaryMax definition used in the data type.
Propriété publiqueMembre statique VarCharMax Gets a data type that specifies the VarCharMax definition used in the data type.
Propriété publiqueMembre statique Variant Gets a data type that specifies the Variant definition used in the data type.
Propriété publique XmlDocumentConstraint Gets or sets a value that indicates how an XML document is formatted.

Haut de la page

Méthodes

  Nom Description
Méthode publiqueMembre statique Binary Returns an object that represents the specified type.
Méthode publiqueMembre statique Char Returns an object that represents the specified type.
Méthode publiqueMembre statique 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.
Méthode publiqueMembre statique 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.
Méthode publiqueMembre statique Decimal Returns an object that represents the specified type.
Méthode publique Equals(Object) Determines whether the specified object is considered equal to the current data type. (remplace Object. . :: . .Equals(Object).)
Méthode publique Equals(DataType) Determines whether the specified data types are considered equal.
Méthode protégée Finalize (hérité de Object.)
Méthode publique GetHashCode This method supports the SQL Server infrastructure and is not intended to be used directly from your code. (remplace Object. . :: . .GetHashCode() () () ().)
Méthode publique GetType (hérité de Object.)
Méthode protégée MemberwiseClone (hérité de Object.)
Méthode publiqueMembre statique NChar Returns an object that represents the specified type.
Méthode publiqueMembre statique Numeric Returns an object that represents the specified type.
Méthode publiqueMembre statique NVarChar Returns an object that represents the specified type.
Méthode publiqueMembre statique 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.
Méthode publique ToString Returns the object in string format. (remplace Object. . :: . .ToString() () () ().)
Méthode publiqueMembre statique UserDefinedDataType(String) Returns an object that represents the specified type.
Méthode publiqueMembre statique UserDefinedDataType(String, String) Returns an object that represents the specified type with the specified schema.
Méthode publiqueMembre statique UserDefinedTableType(String) Returns an object that represents the specified type.
Méthode publiqueMembre statique UserDefinedTableType(String, String) Returns an object that represents the specified type with the specified schema.
Méthode publiqueMembre statique UserDefinedType(String) Returns an object that represents the specified type.
Méthode publiqueMembre statique UserDefinedType(String, String) Returns an object that represents the specified type with the specified schema.
Méthode publiqueMembre statique VarBinary Returns an object that represents the specified type.
Méthode publiqueMembre statique VarChar Returns an object that represents the specified type.
Méthode publiqueMembre statique Xml(String) Returns an object that represents the specified type.
Méthode publiqueMembre statique Xml(String, String) Returns an object that represents the specified type and with the specified schema.
Méthode publiqueMembre statique Xml(String, String, XmlDocumentConstraint) Returns an object that represents the specified type, schema and XML document constraint.

Haut de la page

Implémentations d'interfaces explicites

  Nom Description
Implémentation d'interface expliciteMéthode privée IXmlSerializable. . :: . .GetSchema Not implemented.
Implémentation d'interface expliciteMéthode privée IXmlSerializable. . :: . .ReadXml Deserializes the DAC type properties from an XML stream. Identifié à titre d'information uniquement. Non pris en charge. La compatibilité future n'est pas garantie..
Implémentation d'interface expliciteMéthode privée IXmlSerializable. . :: . .WriteXml Serializes the data type properties to an XML stream. Identifié à titre d'information uniquement. Non pris en charge. La compatibilité future n'est pas garantie..

Haut de la page

Notes

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

Thread Safety

Tout membre statique public (Partagé dans Microsoft Visual Basic) de ce type est sûr dans le cadre des opérations à plusieurs threads. Tous les membres de l'instance ne sont pas garantis comme étant thread-safe.

Sécurité des threads

Tous les membres publics static (Shared dans Visual Basic) de ce type sont thread-safe. Tous les membres de l'instance ne sont pas garantis comme étant thread-safe.