ComponentOne DataObjects for .NET
Using Table Properties
DataObjects for .NET (Enterprise Edition) > Schema Objects > Simple Tables > Using Table Properties

The Connection and DbTableName properties (or SelectCommandText for a SQL-based table) define the database identity of a table. If both properties are set to a value, the table is considered bound to a database table and all database operations are performed automatically by DataObjects for .NET.

SQL-based tables can be managed automatically by DataObjects for .NET if you create DataAdapter components for them. There are also advanced options for SQL-based and unbound tables, where database access is performed with custom SQL statements or entirely from code; for more information see Bound, SQL-Based and Unbound Tables.

The PrimaryKey read-only property returns the table primary key fields whose PrimaryKey property is set to True. Primary key values must be unique in table rows; an attempt to set a duplicate primary key generates an exception. Normally, every table must have a primary key, that is, at least one field with PrimaryKey property set to True. Although tables without primary key are allowed (such tables usually have an empty DbTableName (see Bound, SQL-Based and Unbound Tables), they have to be read-only, and they cannot be used in composite tables.

The ReadOnly, AllowAddNew and AllowDelete properties control table updatability.

ConstraintsFieldLevel and ConstraintsRecordLevel properties are collections of table constraints, ConstraintInfo objects. Constraints are expressions (see DataObjects for .NET Expressions for more information). ConstraintsRecordLevel contains record level constraints that are evaluated when the user finishes editing a row, before the C1TableLogic BeforeEndEdit event. If one of the constraints is not satisfied, an exception is thrown. The exception message is determined by ErrorDescription.Constraints with the Condition expression (if non-empty) evaluating to False, are skipped and not tested. ConstraintsFieldLevel contains field level constraints, those that are evaluated on every field change. Usually, a field level constraint belongs to a certain field, not to the table as a whole, in which case it resides in Constraints. ConstraintsFieldLevel should contain only field level constraints that cannot be associated with a particular field. Constraints in ConstraintsFieldLevel are evaluated each time any table field changes, whereas constraints in Constraints are evaluated on the owner field change.

The IgnoreDeleteError, UpdateLocateMode, and UpdateRefreshMode properties control the process of updating table rows, committing changes to the database (see Updating the Database for more information).