Partager via


DataType Constructor (SqlDataType, Int32)

Initializes a new instance of the DataType class based on a specified Microsoft SQL Server data type with specified precision or maximum length.

Espace de noms: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Syntaxe

'Déclaration
Public Sub New ( _
    sqlDataType As SqlDataType, _
    precisionOrMaxLength As Integer _
)
public DataType (
    SqlDataType sqlDataType,
    int precisionOrMaxLength
)
public:
DataType (
    SqlDataType sqlDataType, 
    int precisionOrMaxLength
)
public DataType (
    SqlDataType sqlDataType, 
    int precisionOrMaxLength
)
public function DataType (
    sqlDataType : SqlDataType, 
    precisionOrMaxLength : int
)

Paramètres

  • sqlDataType
    A SqlDataType object value that specifies the SQL Server data type.
  • precisionOrMaxLength
    An Int32 value that specifies the precision for numeric SQL Server data types and maximum length for text based SQL Server data types.

Notes

Cet espace de noms, cette classe ou ce membre est pris en charge uniquement par la version 2.0 de Microsoft .NET Framework.

Exemple

How to: Construct a DataType Object by Using the Default Constructor in Visual Basic .NET

Plateformes

Plateformes de développement

Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.

Plateformes cibles

Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.

Voir aussi

Référence

DataType Class
DataType Members
Microsoft.SqlServer.Management.Smo Namespace

Autres ressources

Working with Data Types