Click or drag to resize
AbstractTableManagerAddTableColumn Method
Add column to specified table.

Namespace: CMS.DataEngine
Assembly: CMS.DataEngine (in CMS.DataEngine.dll) Version: 11.0.0
Syntax
C#
public virtual void AddTableColumn(
	string tableName,
	string columnName,
	string columnType,
	bool allowNull,
	string defaultValue,
	bool forceDefaultValue = true
)

Parameters

tableName
Type: SystemString
Table name
columnName
Type: SystemString
Name of a new column
columnType
Type: SystemString
Type of a new column
allowNull
Type: SystemBoolean
Allow NULL values in new column or not
defaultValue
Type: SystemString
Default value of the column in system (en) culture. Null if no default value is set
forceDefaultValue (Optional)
Type: SystemBoolean
Indicates if column default value should be set if column doesn't allow NULL values

Implements

ITableManagerAddTableColumn(String, String, String, Boolean, String, Boolean)
Exceptions
ExceptionCondition
ArgumentNullExceptiontableName, columnName or columnType is null.
See Also