Compartir a través de


Clase DataType

The DataType object represents a SQL Server data type.

Jerarquía de herencia

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

Espacio de nombres:  Microsoft.SqlServer.Management.Smo
Ensamblado:  Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)

Sintaxis

'Declaración
Public Class DataType _
    Implements IXmlSerializable
'Uso
Dim instance As DataType
public class DataType : IXmlSerializable
public ref class DataType : IXmlSerializable
type DataType =  
    class
        interface IXmlSerializable
    end
public class DataType implements IXmlSerializable

El tipo DataType expone los siguientes miembros.

Constructores

  Nombre Descripción
Método público DataType() () () () Initializes a new instance of the DataType class.
Método público DataType(SqlDataType) Initializes a new instance of the DataType class based on a specified SQL Server data type.
Método público DataType(UserDefinedDataType) Initializes a new instance of the DataType class based on a specified user-defined data type.
Método público DataType(UserDefinedTableType) Initializes a new instance of the DataType class based on a specified user-defined table type.
Método público DataType(UserDefinedType) Initializes a new instance of the DataType class based on a specified user-defined type.
Método público DataType(XmlSchemaCollection) Initializes a new instance of the DataType class based on a specified XML schema collection.
Método público 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étodo público DataType(SqlDataType, String) Initializes a new instance of the DataType class based on a specified SQL Server data type with the specified type.
Método público 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étodo público 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.

Arriba

Propiedades

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

Arriba

Métodos

  Nombre Descripción
Método públicoMiembro estático Binary Returns an object that represents the specified type.
Método públicoMiembro estático Char Returns an object that represents the specified type.
Método públicoMiembro estático 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étodo públicoMiembro estático 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étodo públicoMiembro estático Decimal Returns an object that represents the specified type.
Método público Equals(Object) Determines whether the specified object is considered equal to the current data type. (Invalida Object. . :: . .Equals(Object).)
Método público Equals(DataType) Determines whether the specified data types are considered equal.
Método protegido Finalize (Se hereda de Object.)
Método público GetHashCode This method supports the SQL Server infrastructure and is not intended to be used directly from your code. (Invalida Object. . :: . .GetHashCode() () () ().)
Método público GetType (Se hereda de Object.)
Método protegido MemberwiseClone (Se hereda de Object.)
Método públicoMiembro estático NChar Returns an object that represents the specified type.
Método públicoMiembro estático Numeric Returns an object that represents the specified type.
Método públicoMiembro estático NVarChar Returns an object that represents the specified type.
Método públicoMiembro estático 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étodo público ToString Returns the object in string format. (Invalida Object. . :: . .ToString() () () ().)
Método públicoMiembro estático UserDefinedDataType(String) Returns an object that represents the specified type.
Método públicoMiembro estático UserDefinedDataType(String, String) Returns an object that represents the specified type with the specified schema.
Método públicoMiembro estático UserDefinedTableType(String) Returns an object that represents the specified type.
Método públicoMiembro estático UserDefinedTableType(String, String) Returns an object that represents the specified type with the specified schema.
Método públicoMiembro estático UserDefinedType(String) Returns an object that represents the specified type.
Método públicoMiembro estático UserDefinedType(String, String) Returns an object that represents the specified type with the specified schema.
Método públicoMiembro estático VarBinary Returns an object that represents the specified type.
Método públicoMiembro estático VarChar Returns an object that represents the specified type.
Método públicoMiembro estático Xml(String) Returns an object that represents the specified type.
Método públicoMiembro estático Xml(String, String) Returns an object that represents the specified type and with the specified schema.
Método públicoMiembro estático Xml(String, String, XmlDocumentConstraint) Returns an object that represents the specified type, schema and XML document constraint.

Arriba

Implementaciones de interfaces explícitas

  Nombre Descripción
Implementación de interfaces explícitasMétodo privado IXmlSerializable. . :: . .GetSchema Not implemented.
Implementación de interfaces explícitasMétodo privado IXmlSerializable. . :: . .ReadXml Deserializes the DAC type properties from an XML stream. Solamente se identifica con fines informativos. No compatible. La compatibilidad con versiones posteriores no está garantizada..
Implementación de interfaces explícitasMétodo privado IXmlSerializable. . :: . .WriteXml Serializes the data type properties to an XML stream. Solamente se identifica con fines informativos. No compatible. La compatibilidad con versiones posteriores no está garantizada..

Arriba

Comentarios

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

Thread Safety

Todos los miembros estáticos (compartidos en Microsoft Visual Basic) públicos de este tipo son seguros para operaciones multiproceso. No se garantiza que los miembros de instancia sean seguros para subprocesos.

Seguridad para subprocesos

Cualquier miembro público static (Shared en Visual Basic) de este tipo es seguro para subprocesos. No se garantiza que los miembros de instancia sean seguros para subprocesos.