ComponentOne DataObjects for .NET
Field Properties
DataObjects for .NET Express Edition > C1ExpressTable: Working with Simple and Composite Tables > Defining Fields > Field Properties

The Field properties include the following:

Property Description
AllowDbNull Gets or sets a value indicating whether null or empty string values are allowed in this field. If it is set to False, an attempt to assign null or empty string value to this field generates an exception.
AutoIncrement Gets or sets a value indicating whether the field automatically receives an incremented value for a new row added to the table.
AutoIncrementSeed Gets or sets the starting value for a field with AutoIncrement other than None.
AutoIncrementStep Gets or sets the increment a field with AutoIncrement other than None.
Constraints Returns the collection of constraints, ConstraintInfo objects. Constraints are evaluated (tested) when the value of the field changes. For a change to be successful, all constraint expressions (Expression) must evaluate to True. If one of the constraints is not satisfied, an exception is thrown. The exception message is determined by ErrorDescription. Constraints with Condition expression (if non-empty) evaluating to False, are skipped, not tested. See also, DataObjects for .NET Expressions for a description of DataObjects for .NET expression language.
DataSourceReadOnly Gets or sets the value indicating whether the field value in the database can be changed. If this property is set to True, the field value will not be set updating the database. It also cannot be modified unless it is done in a newly added row, before the BeforeEndAddNew event (as with ReadOnlyUnlessNew = True).
DefaultValue Gets or sets the default value, in string representation, for the field in a newly created row.
MaxLength Gets or sets the maximum length of a string field, in characters. If the length is unlimited, the value is 0 (default).
PrimaryKey Determines whether the field belongs to the table's primary key. It is determined automatically by DataObjects for .NET Express based on the database table structure.
Precision For numeric fields (DataType is Numeric, Decimal, or DbTimeStamp), this property sets or gets the maximum number of digits representing values.
ReadOnly Gets or sets a value indicating whether the field value can be changed by the end user or from event code. If set to True, an attempt to change the field throws an exception.
ReadOnlyUnlessNew Gets or sets a value indicating whether the field value can be changed after the row has been added to the table (after AfterEndAddNew event). If set to True, an attempt to change the field throws an exception unless it is done in a newly added row, before the BeforeEndAddNew event.
Scale For numeric fields (DataType is Numeric, Decimal, or DbTimeStamp), this property sets or gets the scale of numeric values, that is, how many digits to the right of the decimal point are used to represent values.
Unique Gets or sets a value indicating whether the values of this field in each row must be unique. If it is set to True, an attempt to assign a duplicate value to this field generates an exception.