Column Column Column Constructors

Definition

Overloads

Column() Column() Column()

Initializes a new instance of the Column class.

Column(SqlSmoObject, String) Column(SqlSmoObject, String) Column(SqlSmoObject, String)

Initializes a new instance of the Column class that has the specified parent and specified name.

Column(SqlSmoObject, String, DataType) Column(SqlSmoObject, String, DataType)

Initializes a new instance of the Column class that has the specified parent and specified name.

Column(SqlSmoObject, String, DataType, Boolean) Column(SqlSmoObject, String, DataType, Boolean)

Initializes a new instance of the Column class that uses the specified parent, datayype, and optionally adding the FILESTREAM attribute.

Column() Column() Column()

Initializes a new instance of the Column class.

public:
 Column();
public Column ();
Public Sub New ()

Examples

Working with Database Objects

Remarks

The default constructor initializes any fields to their default values.

Column(SqlSmoObject, String) Column(SqlSmoObject, String) Column(SqlSmoObject, String)

Initializes a new instance of the Column class that has the specified parent and specified name.

public:
 Column(Microsoft::SqlServer::Management::Smo::SqlSmoObject ^ parent, System::String ^ name);
public Column (Microsoft.SqlServer.Management.Smo.SqlSmoObject parent, string name);
Public Sub New (parent As SqlSmoObject, name As String)
Parameters
parent
SqlSmoObject SqlSmoObject SqlSmoObject

A SqlSmoObject object that specifies the parent that owns the Column object.

name
String String String

A String value that specifies the name of the column.

Examples

Working with Database Objects

Column(SqlSmoObject, String, DataType) Column(SqlSmoObject, String, DataType)

Initializes a new instance of the Column class that has the specified parent and specified name.

public:
 Column(Microsoft::SqlServer::Management::Smo::SqlSmoObject ^ parent, System::String ^ name, Microsoft::SqlServer::Management::Smo::DataType ^ dataType);
public Column (Microsoft.SqlServer.Management.Smo.SqlSmoObject parent, string name, Microsoft.SqlServer.Management.Smo.DataType dataType);
Parameters
parent
SqlSmoObject SqlSmoObject SqlSmoObject

A SqlSmoObject object that specifies the parent of the Column object.

name
String String String

A String value that specifies the name of the column.

dataType
DataType DataType DataType

A DataType object value that specifies the data type assigned to the column.

Examples

Working with Database Objects

Column(SqlSmoObject, String, DataType, Boolean) Column(SqlSmoObject, String, DataType, Boolean)

Initializes a new instance of the Column class that uses the specified parent, datayype, and optionally adding the FILESTREAM attribute.

public:
 Column(Microsoft::SqlServer::Management::Smo::SqlSmoObject ^ parent, System::String ^ name, Microsoft::SqlServer::Management::Smo::DataType ^ dataType, bool isFileStream);
public Column (Microsoft.SqlServer.Management.Smo.SqlSmoObject parent, string name, Microsoft.SqlServer.Management.Smo.DataType dataType, bool isFileStream);
Parameters
parent
SqlSmoObject SqlSmoObject SqlSmoObject

A SqlSmoObject object that specifies the parent that owns the Column object.

name
String String String

A String value that specifies the name of the column.

dataType
DataType DataType DataType

A DataType object value that specifies the data type assigned to the column.

isFileStream
Boolean Boolean Boolean

A Boolean value that specifies if the FILESTREAM attribute will be attached to the column.

Examples

Working with Database Objects

Remarks

If isFileStream is true and dataType is any value except VarBinaryMax an error is generated.

Applies to