Click or drag to resize
TableManager Class
Ensures management of database table and table column.
Inheritance Hierarchy

Namespace: CMS.DataProviderSQL
Assembly: CMS.DataProviderSQL (in CMS.DataProviderSQL.dll) Version: 9.0.0
Syntax
C#
public class TableManager : AbstractTableManager

The TableManager type exposes the following members.

Constructors
  NameDescription
Public methodTableManager
Top
Fields
  NameDescription
Protected fieldmDatabaseCulture
Database culture setting from the web.config.
(Inherited from AbstractTableManager.)
Top
Properties
  NameDescription
Public propertyConnectionString
Connection string to use for table management
(Inherited from AbstractTableManager.)
Public propertyDatabaseCulture
Database culture setting from the web.config.
(Inherited from AbstractTableManager.)
Public propertyDatabaseName
Database name.
(Inherited from AbstractTableManager.)
Public propertyDatabaseServerName
Name of database server.
(Inherited from AbstractTableManager.)
Public propertyDatabaseServerVersion
Version of database server.
(Inherited from AbstractTableManager.)
Public propertyDatabaseSize
Database size(including log size) in MB.
(Inherited from AbstractTableManager.)
Public propertyDatabaseVersion
Database version
(Inherited from AbstractTableManager.)
Public propertyDisableDebug
If true, the debug is disabled in this table manager
(Inherited from AbstractTableManager.)
Top
Methods
  NameDescription
Public methodAddTableColumn
Add column to specified table.
(Inherited from AbstractTableManager.)
Public methodAlterProcedure
Alters specified procedure in database
(Inherited from AbstractTableManager.)
Public methodAlterTableColumn
Rename, retype or allow/not allow NULL values in column
(Inherited from AbstractTableManager.)
Public methodAlterTableColumnWithDefaultValue
Alter table column with default value.
(Inherited from AbstractTableManager.)
Public methodAlterView
Alters specified view in database
(Inherited from AbstractTableManager.)
Public methodColumnExistsInView
Checks if column name is unique in given view.
(Inherited from AbstractTableManager.)
Public methodCreateColumnIndexes
Creates the table indexes.
(Inherited from AbstractTableManager.)
Public methodCreateProcedure
Creates specified procedure in database
(Inherited from AbstractTableManager.)
Public methodCreateTable(String, String)
Creates specified table in database.
(Inherited from AbstractTableManager.)
Public methodCreateTable(String, String, Boolean)
Creates specified table in database.
(Inherited from AbstractTableManager.)
Public methodCreateView
Creates specified view in database
(Inherited from AbstractTableManager.)
Public methodDeleteDataFromTable
Deletes data from specified table.
(Inherited from AbstractTableManager.)
Public methodDeleteObject
Removes view or stored procedure from database.
(Inherited from AbstractTableManager.)
Public methodDropColumnIndexes
Drops the column indexes, returns the DataSet of indexes.
(Inherited from AbstractTableManager.)
Public methodDropDefaultConstraint
Drops the default constraint.
(Inherited from AbstractTableManager.)
Public methodDropTable
Drop specified table from database.
(Inherited from AbstractTableManager.)
Public methodDropTableColumn
Remove column from specified table.
(Inherited from AbstractTableManager.)
Public methodDropView
Drop specified view from database. Returns the schema of the dropped view
(Inherited from AbstractTableManager.)
Protected methodEnsureDefaultValue
Add apostrophes around the column default value string according to column type.
(Inherited from AbstractTableManager.)
Public methodExecuteQuery
Executes query and returns the results in a DataSet.
(Inherited from AbstractTableManager.)
Public methodExecuteScalar
Executes query and returns the results in a DataSet.
(Inherited from AbstractTableManager.)
Public methodGetCode
Returns SQL code of specified view or stored procedure.
(Inherited from AbstractTableManager.)
Public methodGetColumnIndexes
Returns the DataSet of column indexes.
(Inherited from AbstractTableManager.)
Public methodGetColumnInformation
Returns DataSet with specified table column information retrieved from database information schema. Returns columns ColumnName, DataType, DataSize, DataPrecision, Nullable, DefaultValue.
(Inherited from AbstractTableManager.)
Protected methodGetConnection
Gets the connection for the table management
(Inherited from AbstractTableManager.)
Protected methodGetDatabaseInfo
Gets size related information about the database.
(Inherited from AbstractTableManager.)
Protected methodGetDatabaseSize
Gets database size (including log size) or N/A string if the size cannot be retrieved
(Inherited from AbstractTableManager.)
Protected methodGetDatabaseVersion
Gets the database version
(Inherited from AbstractTableManager.)
Public methodGetIndexes
Returns DataSet with indexes of the given object. Returns columns IndexName, DropScript, CreateScript
(Inherited from AbstractTableManager.)
Public methodGetList
Returns list of views or stored procedures.
(Inherited from AbstractTableManager.)
Public methodGetPKConstraintName
Returns the name of the primary key constraint.
(Inherited from AbstractTableManager.)
Public methodGetPrimaryKeyColumns
Returns list of column names which represent primary keys of the specified database table. Returns empty list if primary keys are not found.
(Inherited from AbstractTableManager.)
Public methodGetTableDependencies
Gets list of object names which have foreign key constraint dependency.
(Inherited from AbstractTableManager.)
Public methodGetTablePKName
Returns name of the primary key. If more columns in PK, names are separated by semicolon ";".
(Inherited from AbstractTableManager.)
Public methodGetTables
Gets the tables in the current database
(Inherited from AbstractTableManager.)
Public methodGetValueString
Returns the value string using the database culture. Does not include apostrophes for types that need them
(Inherited from AbstractTableManager.)
Public methodGetXmlSchema
Returns XML schema for specified table.
(Inherited from AbstractTableManager.)
Public methodChangeDBObjectOwner
Changes database object owner.
(Inherited from AbstractTableManager.)
Public methodRecreatePKConstraint
Drops the current primary key constraint and creates new from given columns.
(Inherited from AbstractTableManager.)
Public methodRefreshView
Refreshes specified view in database.
(Inherited from AbstractTableManager.)
Public methodRenameColumn
Changes name of the column.
(Inherited from AbstractTableManager.)
Public methodRenameTable
Changes name of the table with original name according to the new name.
(Inherited from AbstractTableManager.)
Public methodStoredProcedureExists
Determines whether specified stored procedure exists or not.
(Inherited from AbstractTableManager.)
Public methodTableExists
Determines whether specified DB table exists or not.
(Inherited from AbstractTableManager.)
Public methodViewExists(String)
Determines whether specified DB view exists or not.
(Inherited from AbstractTableManager.)
Public methodViewExists(String, String)
Determines whether specified DB view exists or not.
(Inherited from AbstractTableManager.)
Top
See Also