/ Assembly List / LJCNetCommon / DbColumn

Namespace - LJCNetCommon


Syntax

C#
public class DbColumn : IComparable<DbColumn>

Represents a Data Column definition. (D)

Remarks

The DbColumn object is used extensively throughout the LJC libraries, utilities and applications; wherever data elements need to be dynamically defined or manipulated. It is commonly used to define database table columns, grid control columns and text file columns and is often used to facilitate moving data between a database table column, grid control column, text file column or other data source and a data object.

A Data Object is an instance of a class that contains properties for each data element in a data source row. It is a strongly typed, object oriented representation of the data source row for use in code. It may contain common methods to assist with cloning, sorting and displaying an object string identifier.

When the ColumnName property is set, it will set the PropertyName property to the same value if PropertyName is null. This is the most common scenario where the data object property name is the same as the data source column name.

If a data object property name is different than the data source column name, then the PropertyName value must be set to the data object property name. For join columns, it may be the case that a different PropertyName needs to be chosen as there is already a property with that name. This often means that a RenameAs value must be assigned as there is most likely also a table column name conflict with the primary table.

Static
op_Implicit Creates a DbValue object from a DbColumn object. (E)

Constructor
#ctor Initializes an object instance.
#ctor The Copy constructor.
#ctor Initializes an object instance with the supplied values.

Data
Clone Clones the structure of the object.
CompareTo Provides the default Sort functionality.
FormatValue Formats the column value for the SQL string. (D)
ToString The object string identifier.
8 Methods

Properties
AddOrderIndex Missing Summary
AllowDBNull Gets or sets the AllowDBNull value.
AutoIncrement Gets or sets the AutoIncrement value.
Caption Gets or sets the Caption value. (R)
ColumnName Gets or sets the ColumnName value. (R)
DataTypeName Gets or sets the DataTypeName value.
DefaultValue Gets or sets the DefaultValue value.
ID Gets or sets the ID value. (R)
IsChanged Indicates that the value has changed.
IsPrimaryKey Gets or sets the IsPrimaryKey value.
KeyType Gets or sets the KeyType value.
MaxLength Gets or sets the MaxLength value.
Position Gets or sets the Position value. (R)
PropertyName Gets or sets the PropertyName value. (R)
RenameAs Gets or sets the RenameAs value.
Sequence Gets or sets the Sequence value. (R)
SQLTypeName Gets or sets the SQLTypeName value.
Unique Gets or sets the Unique value.
Value Gets or sets the Value object.
ViewDataID Gets or sets the ViewData ID value. (R)
ViewJoinID Gets or sets the ViewJoin ID value. (R)
Width Gets or sets the Width value. (R)

Fields
ColumnAllowDBNull The AllowDBNull column name.
ColumnAutoIncrement The AutoIncrement column name.
ColumnCaption The Caption column name.
ColumnColumnName The ColumnName column name.
ColumnDataTypeName The DataTypeName column name.
ColumnMaxLength The MaxLength column name.
ColumnPosition The Position column name.
ColumnPropertyName The PropertyName column name.
ColumnRenameAs The RenameAs column name.
ColumnSQLTypeName The SQLTypeName column name.
ColumnValue The Value column name.

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.