Partilhar 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.

Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Syntax

'Declaration
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
)

Parameters

  • 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.

Remarks

This namespace, class, or member is supported only in version 2.0 of the Microsoft .NET Framework.

Example

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

Platforms

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

Target Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

See Also

Reference

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

Other Resources

Working with Data Types